View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Why does my spreadsheet calc slower when many other windows ar

Excellent information to know. Glad you kept at it and actually found out
something new (new to me at least) - it's a tidbit I hope I don't forget soon.

Posting back with information like that is ALWAYS helpful to someone down
the road either by someone having read it and remembering it, or by someone
with similar problem looking for an answer and doing tough research in
reading through discussions like this. Very helpful to very many!

"BJB99" wrote:

For anyone interested, I did find out a couple of things.

If you have a cell that calls a VB function such as "myfunc()", then during
the recalc Excel will change the title of the VBA window to "Running myfunc
..." then back again. If you have thousands of cells calling VBA functions
it will do this thousands of times. Each time the window title changes,
Explorer will update the task bar. All of this activity causes many context
switches (up to 100,000 per second in my tests), and context switches soak up
CPU power, especially on a multi-CPU box and more especially when there are
40 other applications to switch in and out.

Excel does this VBA-window-title-updating even if you hide the VBA window.
But it may not do it if you have never shown the VBA window.

If you have this problem, you can avoid it by calcing the sheet from a macro
instead of F9. Then the VBA title changes just once to say it is running the
overall macro, not once per VBA-calling cell.

Regards,

Bryan

"BJB99" wrote:

Recently upgraded from Excel 2002 to 2003, from Windows 2000 to XP, and from a
dual P4 to dual Xeon 5100, i.e. four cores. This is a big, fast machine.
But one sheet is running slower!

This particular sheet calcs in about 1 second with not much else running,
but
4-8 seconds when all windows (about 40 total) are open.
It is not short of CPU - task manager shows about 25% CPU usage, and in this
state Excel itself never goes above 10% CPU usage.
It is not short of memory - this machine has 4GB of RAM and around 2GB used.

I have looked at the network traffic and it doesn't seem to be doing file
I/O. The sheet does receive a lot of data from Reuters (via RtGet) but that
shouldn't change just because I opened some more windows.

Any ideas what it could be, or what to try?

Bryan