PC Review


Reply
Thread Tools Rate Thread

Code in PP2007 to manipulate shapes runs slower and slower

 
 
James
Guest
Posts: n/a
 
      14th Sep 2009
Hi

We develop a commercial add-in for PowerPoint and have been doing so for
10 years now.

What this requires is for the slides to update dynamically and
programmatically according to live data polled from a database. This has
all been working fine up until recently. We have found that, in
PowerPoint 2007, simply refreshing a slide (ie reloading the data from
the database and redrawing the chart) takes an increasingly longer
period to do. In other words, the same code runs slower and slower - in
testing we have got this to over 15 seconds for a routine that started
out taking 0.1 seconds! This occurs both in edit mode and when running a
slideshow.

The charts are created by manipulating shapes within PowerPoint and
MSChart is not being invoked.

There is also a simple, but strange 'fix' to all this. If the user
manipulates a shape manually on the slide, or even types in a letter
into the notes pane, say, then the routine will suddenly run again at
optimum speed. However, this has to be done manually. Any programmatic
changes I make do not do this.

It is as if all the 'stack' of vba commands are being cumulatively
stored by PowerPoint (for some sort of undo??) and only is the
collection cleared when the user makes a change to the slide.

If anyone has had a similar experience or indeed has a solution to this,
I'd be very interested to hear it!

Our add-in is created in VB6 as a COM add-in.

Thanks in advance

James
 
Reply With Quote
 
 
 
 
Chirag
Guest
Posts: n/a
 
      23rd Sep 2009
Have you tried changing the ViewType of the Window?

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"James" <jahbur-at-yahoo.co.uk> wrote in message
news:(E-Mail Removed)...
> Hi
>
> We develop a commercial add-in for PowerPoint and have been doing so for
> 10 years now.
>
> What this requires is for the slides to update dynamically and
> programmatically according to live data polled from a database. This has
> all been working fine up until recently. We have found that, in PowerPoint
> 2007, simply refreshing a slide (ie reloading the data from the database
> and redrawing the chart) takes an increasingly longer period to do. In
> other words, the same code runs slower and slower - in testing we have got
> this to over 15 seconds for a routine that started out taking 0.1 seconds!
> This occurs both in edit mode and when running a slideshow.
>
> The charts are created by manipulating shapes within PowerPoint and
> MSChart is not being invoked.
>
> There is also a simple, but strange 'fix' to all this. If the user
> manipulates a shape manually on the slide, or even types in a letter into
> the notes pane, say, then the routine will suddenly run again at optimum
> speed. However, this has to be done manually. Any programmatic changes I
> make do not do this.
>
> It is as if all the 'stack' of vba commands are being cumulatively stored
> by PowerPoint (for some sort of undo??) and only is the collection cleared
> when the user makes a change to the slide.
>
> If anyone has had a similar experience or indeed has a solution to this,
> I'd be very interested to hear it!
>
> Our add-in is created in VB6 as a COM add-in.
>
> Thanks in advance
>
> James


 
Reply With Quote
 
James
Guest
Posts: n/a
 
      28th Sep 2009
Afraid so. In fact it already does that to avoid SlideShows running with
the slidesorter view 'on', as we found it can slow things down
incredibly. From memory each time we manipulated a shape it would redraw
the slidesorter images, including animation builds.

Good thought though! Thanks!

Chirag wrote:
> Have you tried changing the ViewType of the Window?
>
> - Chirag
>
> PowerShow - View multiple PowerPoint slide shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "James" <jahbur-at-yahoo.co.uk> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> We develop a commercial add-in for PowerPoint and have been doing so
>> for 10 years now.
>>
>> What this requires is for the slides to update dynamically and
>> programmatically according to live data polled from a database. This
>> has all been working fine up until recently. We have found that, in
>> PowerPoint 2007, simply refreshing a slide (ie reloading the data
>> from the database and redrawing the chart) takes an increasingly
>> longer period to do. In other words, the same code runs slower and
>> slower - in testing we have got this to over 15 seconds for a routine
>> that started out taking 0.1 seconds! This occurs both in edit mode
>> and when running a slideshow.
>>
>> The charts are created by manipulating shapes within PowerPoint and
>> MSChart is not being invoked.
>>
>> There is also a simple, but strange 'fix' to all this. If the user
>> manipulates a shape manually on the slide, or even types in a letter
>> into the notes pane, say, then the routine will suddenly run again at
>> optimum speed. However, this has to be done manually. Any
>> programmatic changes I make do not do this.
>>
>> It is as if all the 'stack' of vba commands are being cumulatively
>> stored by PowerPoint (for some sort of undo??) and only is the
>> collection cleared when the user makes a change to the slide.
>>
>> If anyone has had a similar experience or indeed has a solution to
>> this, I'd be very interested to hear it!
>>
>> Our add-in is created in VB6 as a COM add-in.
>>
>> Thanks in advance
>>
>> James

>

 
Reply With Quote
 
Chirag
Guest
Posts: n/a
 
      28th Sep 2009
I meant that you should try changing the ViewType after every few operations
and come back to the original ViewType. See if it helps. Perhaps you have
already tried it.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"James" <jahbur-at-yahoo.co.uk> wrote in message
news:(E-Mail Removed)...
> Afraid so. In fact it already does that to avoid SlideShows running with
> the slidesorter view 'on', as we found it can slow things down incredibly.
> From memory each time we manipulated a shape it would redraw the
> slidesorter images, including animation builds.
>
> Good thought though! Thanks!
>
> Chirag wrote:
>> Have you tried changing the ViewType of the Window?
>>
>> - Chirag
>>
>> PowerShow - View multiple PowerPoint slide shows simultaneously
>> http://officeone.mvps.org/powershow/powershow.html


 
Reply With Quote
 
James
Guest
Posts: n/a
 
      28th Sep 2009
Thanks Chirag - I hadn't actually tried that, but it doesn't solve the
problem I'm afraid. I even tried switching to a different viewtype, do
the updating and then switching back, all to no avail. If I manually
move a shape, or type something in, anywhere (in a shape or the Notes
Pane), then I get back to optimum speed.

I'll have a go at creating something similar in a simple vba project
that can be posted here, although I'm not too sure if it'll 'work'.

Cheers

Chirag wrote:
> I meant that you should try changing the ViewType after every few
> operations and come back to the original ViewType. See if it helps.
> Perhaps you have already tried it.
>
> - Chirag
>
> PowerShow - View multiple PowerPoint slide shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "James" <jahbur-at-yahoo.co.uk> wrote in message
> news:(E-Mail Removed)...
>> Afraid so. In fact it already does that to avoid SlideShows running
>> with the slidesorter view 'on', as we found it can slow things down
>> incredibly. From memory each time we manipulated a shape it would
>> redraw the slidesorter images, including animation builds.
>>
>> Good thought though! Thanks!
>>
>> Chirag wrote:
>>> Have you tried changing the ViewType of the Window?
>>>
>>> - Chirag
>>>
>>> PowerShow - View multiple PowerPoint slide shows simultaneously
>>> http://officeone.mvps.org/powershow/powershow.html

>

 
Reply With Quote
 
James
Guest
Posts: n/a
 
      28th Sep 2009
Yep it works. Here's a link to an example file with a simple macro in
it. All it does is move each shape up and down one pixel and times the
whole process. By repeatedly running the macro, it soon starts to slow
down. To reset it back to its optimum speed, simply move something or
type something into the Notes Pane. You can either run the macro from
the vba editor window or from the slideshow using the helpful button
I've put on the slide...

I'd be very interested to here if anyone gets similar results to me, or
indeed if they don't and it doesn't slow down at all, ever. Either
result would be welcome news!

http://www.buckhurst.info/TimerTest.pptm

Thanks in advance.

James

James wrote:
> Thanks Chirag - I hadn't actually tried that, but it doesn't solve the
> problem I'm afraid. I even tried switching to a different viewtype, do
> the updating and then switching back, all to no avail. If I manually
> move a shape, or type something in, anywhere (in a shape or the Notes
> Pane), then I get back to optimum speed.
>
> I'll have a go at creating something similar in a simple vba project
> that can be posted here, although I'm not too sure if it'll 'work'.
>
> Cheers
>
> Chirag wrote:
>> I meant that you should try changing the ViewType after every few
>> operations and come back to the original ViewType. See if it helps.
>> Perhaps you have already tried it.
>>
>> - Chirag
>>
>> PowerShow - View multiple PowerPoint slide shows simultaneously
>> http://officeone.mvps.org/powershow/powershow.html
>>
>> "James" <jahbur-at-yahoo.co.uk> wrote in message
>> news:(E-Mail Removed)...
>>> Afraid so. In fact it already does that to avoid SlideShows running
>>> with the slidesorter view 'on', as we found it can slow things down
>>> incredibly. From memory each time we manipulated a shape it would
>>> redraw the slidesorter images, including animation builds.
>>>
>>> Good thought though! Thanks!
>>>
>>> Chirag wrote:
>>>> Have you tried changing the ViewType of the Window?
>>>>
>>>> - Chirag
>>>>
>>>> PowerShow - View multiple PowerPoint slide shows simultaneously
>>>> http://officeone.mvps.org/powershow/powershow.html

>>

 
Reply With Quote
 
Chirag
Guest
Posts: n/a
 
      28th Sep 2009
Hi James,

Bad news: I am able to reproduce the issue.
Good news: A workaround is to get rid of the VBA CommandButton and use
PowerPoint shape on the slide and assign "Run macro" action to the shape. I
did that and now the macro doesn't slow down the updates.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"James" <jahbur-at-yahoo.co.uk> wrote in message
news:(E-Mail Removed)...
> Yep it works. Here's a link to an example file with a simple macro in it.
> All it does is move each shape up and down one pixel and times the whole
> process. By repeatedly running the macro, it soon starts to slow down. To
> reset it back to its optimum speed, simply move something or type
> something into the Notes Pane. You can either run the macro from the vba
> editor window or from the slideshow using the helpful button I've put on
> the slide...
>
> I'd be very interested to here if anyone gets similar results to me, or
> indeed if they don't and it doesn't slow down at all, ever. Either result
> would be welcome news!
>
> http://www.buckhurst.info/TimerTest.pptm
>
> Thanks in advance.
>
> James


 
Reply With Quote
 
James
Guest
Posts: n/a
 
      28th Sep 2009
Many thanks for checking this out for me. I think the reason it doesn't
slow down when you click on a PowerPoint shape is because you are
manually interfacing at some level with the slide and that is what sorts
the problem out. Having said that, interestingly enough, if I don't use
the shape to run the macro but just play a sound, then it doesn't cure
the problem. Does it slow down in the Edit Window with no slideshow running?

In any case a) I need this to be a code-driven process without the need
for user interaction and b) having the mouse on-screen during a
slideshow is not an option.

The example I have posted here is a very simplified version of what our
dll does, but I'm glad to see that the problem can be reproduced without
mountains of code. Unfortunately it also means it's not my fault that
it's happening and therefore it's most likely not in my control to be
able to fix it.

Thanks Chirag

James

Chirag wrote:
> Hi James,
>
> Bad news: I am able to reproduce the issue.
> Good news: A workaround is to get rid of the VBA CommandButton and use
> PowerPoint shape on the slide and assign "Run macro" action to the
> shape. I did that and now the macro doesn't slow down the updates.
>
> - Chirag
>
> PowerShow - View multiple PowerPoint slide shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "James" <jahbur-at-yahoo.co.uk> wrote in message
> news:(E-Mail Removed)...
>> Yep it works. Here's a link to an example file with a simple macro in
>> it. All it does is move each shape up and down one pixel and times
>> the whole process. By repeatedly running the macro, it soon starts to
>> slow down. To reset it back to its optimum speed, simply move
>> something or type something into the Notes Pane. You can either run
>> the macro from the vba editor window or from the slideshow using the
>> helpful button I've put on the slide...
>>
>> I'd be very interested to here if anyone gets similar results to me,
>> or indeed if they don't and it doesn't slow down at all, ever. Either
>> result would be welcome news!
>>
>> http://www.buckhurst.info/TimerTest.pptm
>>
>> Thanks in advance.
>>
>> James

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vista Copy Speed over the network is slower that XP SP2 and OSX..much slower? Sam Windows Vista General Discussion 9 27th Jun 2008 05:39 PM
Vista Copy Speed over the network is slower that XP SP2 and OSX..much slower? Sam Windows Vista Networking 1 20th Jun 2008 09:19 PM
Remote Desktop Connection gets slower and slower, reboot helps =?Utf-8?B?TWlrZUI=?= Windows XP Work Remotely 5 17th Oct 2004 08:17 PM
A7N8X Deluxe - more memory = slower? or Corsair XMS = slower? Erik Harris Asus Motherboards 2 8th Aug 2004 06:56 PM
system gradually runs slower...and.....slower........a.n..d.......... ~Aart DIY PC 11 1st Jun 2004 02:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:18 AM.