PDA

View Full Version : Deteriorating performance



jlingle
01-17-2013, 11:16 AM
In PowerPoint 2010 I have a program that creates duplicate template slides. For each slide it duplicates It opens an Excel spread sheet to find the data it needs to upgrade the graphs in the template slide. It will end up created 80 slides with graphs. Things start out fine, but as the programs progresses creating slides and updating graphs it starts running more and more slowly until it is taking almost a minute to complete a graph the program had been taking 2 seconds to update.

Does anyone have an idea of what might be creating this degradation of performance? All reasonable hypotheses would be welcome.

John Wilson
01-17-2013, 01:57 PM
Do you want to post the code. Especially the bit that opens Excel.

Paul_Hossler
01-17-2013, 03:25 PM
Kind of sounds like you're running out of resources with all that opening.

Are you sure that you close files and release objects that you no longer need?

Paul

John Wilson
01-18-2013, 07:15 AM
Yep, that where I was going Paul. I have seen people create a new Excel instance for every file and never close them!

jlingle
02-08-2013, 07:14 AM
Thanks for the ideas. Actually, I was closing files although there did seem to be a resource issue. Not sure I was "releasing objects correctly." More importantly I found a way to open a file and look through it only once in a run of 80 slides rather than doing it for each slide. That cut the run time from 17 minutes for the 80 slides down to 2 minutes. It also seemed to solve the resource problem. Thanks again.