Why does my spreadsheet calc slower when many other windows are op

G

Guest

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
 
G

Guest

A lot may depend on what those other 39 windows have going on in the
application(s) that are using them. Also keep in mind that Excel 2003 is
not set up to take advantage of multiple cores when calculating. The issue
of juggling system resources may play into it with that many windows open
also.

So how long did that one sheet take to calculate under the same heavy load
with the dual-P4 setup?

Have you looked at system performance showing all 4-cores to see what the
individual core loads look like when this slowdown takes place?
 
G

Guest

Thanks for your response. As I said, Task Manager shows the machine overall
to be 25% busy, so the machine is not really under heavy load. Most of the
40 windows are sitting in an event loop doing nothing much.

The four CPU graphs in Task Manager show the load to be evenly spread.

On the dual P4 the same sheet calculated in around 1-2 seconds.

The interesting thing is that the other 40 windows somehow cause Excel to
use less CPU, even though there seems to be plenty available.

Bryan
 
G

Guest

"The interesting thing is that the other 40 windows somehow cause Excel to
use less CPU, even though there seems to be plenty available"

That may (or may not) have something to do with Windows managing the limited
resources of the system. System resources do not necessarily increase with
an increase in system RAM.
 
G

Guest

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
 
G

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top