Excel 2007 Charts & Memory Leak??
On 20/04/2011 16:38, Denis wrote:
I have an Excel 2003 macro that creates line charts using defined
names to specify the x and y values for one or more data series on a
chart. This macro also uses the Dictionary object. Those are the
only two features that I can think of that are perhaps somewhat unique
to this macro.
When I run this macro with Excel 2003 to create about a 100 charts or
so in the same workbook, everything runs fine. I can watch the memory
And also I presume about 10x quicker in XL2003 - at least that is what I
observe in my applications which also plot a lot of graphs from VBA.
usage via the Task Manager and the usage peaks at about 100M.
However, when I run this same macro under Excel 2007, the memory usage
grows continually to over 1G and 2007 eventually crashes as it runs
out of memory.
I don't see memory leaks that grow out of control, but the large number
of graphs I plot each have only modest numbers of data points.
Given that I can watch the memory usage grow as more and more charts
are created, that leads me to suspect that Excel 2007 has a memory
leak somewhere. Does anyone know of a memory leak that might be
associated with this kind of a macro?
It wouldn't surprise me. XL2007 graphics objects and charts in
particular are riddled with bugs and glacially slow.
My first guess would be something odd about interactions between named
regions, dictionary objects and graphics objects leaving orphanned
memory copies of the data lying around. Can you alter the amount of data
plotted or use fixed unnamed ranges per graph to see how it scales?
Regards,
Martin Brown
|