[SalesForce] Developer Console freezes in Chrome/IE when a batch process is running

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.

Best Answer

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.