NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PowerPoint - multiple instances / improve throughput?

Offbeatmammal opened this issue · comments

I have a NetOfficeFW developed app that generates PowerPoint decks. Some of these can be quite long running (lots of database access) and generate large (200-300 slides, lots of images). Running a few concurrently on the same machine results in lots of contention within the single PowerPoint.exe instance that's spawned. File writes seem to be a significant bottleneck.

I suspect most of this is architectural within PowerPoint

Is it possible to instantiate a seperate PowerPoint.exe for each instance of the underlying application? Or any other suggestions/recommendations on ways to improve the throughput?

Hi @Offbeatmammal, only a single instance of PowerPoint can run under a Windows account. The only to overcome this is to run multiple user sessions on the machine.

When you use the CreateObject function, which is used to control the Microsoft PowerPoint object model from Microsoft Visual Basic for Applications code, you may notice the following behavior:

  • If PowerPoint is running, a new instance of PowerPoint is not created.
  • If PowerPoint is not running, a new instance is created.
    This behavior is normal.

PowerPoint is a single-session program. CreateObject cannot create a new instance of PowerPoint, if it is already running. This behavior is similar to the Visual Basic GetObject function.

https://support.microsoft.com/en-us/kb/222783

thanks - makes sense.
I'll focus on what's causing the bottlenecks and see if I can identify anything that may be helpful to others
to solve the specific problem we're hitting - very 'bursty' workloads with peaks of usage - we're going to look at spinning up on-demand short lived VMs