N
Niklas Deutschmann
Hi,
I just made a strange observation while investigating a performance problem
with my add-in that caused loading documents to take 5-6 minutes on some
computers.
Documents.OpenEx() seems to search the "My Shapes" directory and all
subdirectories *even* when you pass an absolute filename.
On the machines that showed the performance problem, "My Shapes" was set to
"My Documents" (not "My Documents\My Shapes") for whatever reason.
Steps to reproduce:
- Set the "My Shapes" path to C:\ using "Tools", "Options", "Advanced",
"File Paths"
- Create a stencil and put it into some "subdirectory" of C:\
- Create an empty document with a macro that loads this stencil using the
full pathname:
Application.Documents.OpenEx "C:\subdirectory\stencil.vss",
VisOpenSaveArgs.visAddDocked
- Restart Windows(*), start Visio, open this document, and execute the macro
=> Loading the stencil takes several minutes
Is there any public documentation of this behavior of Documents.OpenEx()? I
don't find anything in the Visio 2007 automation reference.
I'm using Microsoft Office Visio 2007 (12.0.6336.5001) SP1 MSO
(12.0.6320.5000)
(*) Searching for files seems to be faster on subsequent executions because
of some Windows caching/indexing
Niklas
I just made a strange observation while investigating a performance problem
with my add-in that caused loading documents to take 5-6 minutes on some
computers.
Documents.OpenEx() seems to search the "My Shapes" directory and all
subdirectories *even* when you pass an absolute filename.
On the machines that showed the performance problem, "My Shapes" was set to
"My Documents" (not "My Documents\My Shapes") for whatever reason.
Steps to reproduce:
- Set the "My Shapes" path to C:\ using "Tools", "Options", "Advanced",
"File Paths"
- Create a stencil and put it into some "subdirectory" of C:\
- Create an empty document with a macro that loads this stencil using the
full pathname:
Application.Documents.OpenEx "C:\subdirectory\stencil.vss",
VisOpenSaveArgs.visAddDocked
- Restart Windows(*), start Visio, open this document, and execute the macro
=> Loading the stencil takes several minutes
Is there any public documentation of this behavior of Documents.OpenEx()? I
don't find anything in the Visio 2007 automation reference.
I'm using Microsoft Office Visio 2007 (12.0.6336.5001) SP1 MSO
(12.0.6320.5000)
(*) Searching for files seems to be faster on subsequent executions because
of some Windows caching/indexing
Niklas