1

I am often running long DML intensive batch processes in SF while at the same time continuing to use the Developer Console. However, I find that the console is essentially impossible to use while processes are running.

The main symptom is excruciatingly slow response time from the developer window (buttons don't respond, menus don't open, etc), eventually culminating in an "error: no response from server" message. If I click away from the dev console tab while I'm waiting for something to load, then when I click back the entire tab turns into a completely blank white window. Attempting to execute anonymous code gets stuck in the 'Sending Request' window.

I can barely even open debug logs when all I'm trying to do is view results of my batch process!

Is anyone else familiar with this extreme slow-down of the developer console? Have you found any solutions for making it usable again? It would be a severe limitation if I couldn't actually use the thing whenever a batch process happened to be running.

6

The entire Developer Console is built in JavaScript, which, despite recent advances in software and hardware, remains relatively slow in many cases compared to native applications. One place you'll notice this problem is in cases where a ton of work has to be done in a short period of time. Try setting your debug logs to the maximum setting, then try using the full perspective (Debug > Switch Perspective).

If you are debugging a log near 2MB, your browser will probably freeze momentarily trying to render the log. It's really not designed to do that, but we developers try anyways. Also, while in a maximum perspective, change the size of your window, and observe how it appears to stutter or freeze on the inside.

Now, to get to my point, when you're running a batch with say, 10,000 batches, the log table has to be redrawn many times per second potentially, with rapidly increasing memory usage and tons of elements. Your browser will try to accommodate the request to constantly redraw, eventually slowing to a crawl. You'll find that not only the Developer Console unresponsive, but the page you launched the Developer Console will also act jittery and/or freeze. This is because of JavaScript's single-thread model.

Run batches as an alternate user, when possible, or keep such batches small. Clear your logs frequently, as well, since once you get to a couple of hundred logs, you'll notice a pretty sharp decline in performance. You'll probably eventually need to close the window every so often and/or all of the files you're working on, or the console will eventually become slow as things keep piling on, such as the progress sub-tab, which can accumulate thousands of items of its own.

1

It has happened to me previously. For me the reason was that I had kept too many logs open at top. I feel like it does not have much relation to the batch class that is running. Please clear the logs from "Debug -> Clear -> Log Panel (SHIFT+ALT+G).

1

You may be generating too many logs. Are you having the log filter set to finest ? If so try keeping it to default and observe the results.

  • The opposite actually! In both the dev console and in the Setup>Monitor>Logs settings I've set all to ERROR except for Apex, set to Debug. The log files themselves are pretty small, but there are many batches in my process, so many logs are generated per minute. – smohyee Apr 15 '15 at 0:19
  • The size of the logs matters little. In fact, many smaller logs faster is more detrimental than large files, if only because it takes longer to generate and store those logs. – sfdcfox Apr 15 '15 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.