Visio.Application (COM object) Speed 
Author Message
 Visio.Application (COM object) Speed

I've created a VB solution that employs the Visio COM
object to loop through and edit all objects on a
given .vsd file. The code works great except that runs
very slowly.

Some information:
* there are 8 pages with approx 112 objects per page
* the Visio doc is set to invisible to maximize speed
(Visio.invisibleapp)
* the entire process takes upwards of 60 seconds to
execute
* VB.NET is the coding platform

What options do I have to speed this process up? I have
read other posts saying that the speed is determined by
the OLE Automation and not by the screen redraw. Because
of this, I have tried to minimize the code that modifies
the .vsd in any way. The code is very brief.
I have also looked into actually saving the .vsd file as
a .vdx file and, instead of changing the actual Visio
document itself, change the XML in the .vdx... this
sounds good in theory, but there still seem to be
problems with XML schemas created by Visio. Most notably,
the error "The same table (table name here) cannot be the
child table in two nested realations." which you get
when, from .NET, select the Data view instead of the XML
view.
Any help is appreciated! Thx



Tue, 15 Nov 2005 22:32:43 GMT  
 Visio.Application (COM object) Speed
obviously with no knowledge of how you're doing it these
approxmate shooting in the dark, but here goes anyway.

Understand from the beginning that VB.NET assumes that all
of this is across multiple platforms so under the covers
it uses a lot of the network stuff which can really slow
it down even on a standalone system. On my system (p4
254Mhz, 1G memory) the same app took 5 to 6 times as long
to run under vb.net as when it compiled under vb6. I had
to rearchitect it to perform acceptably under vb.net.

1. open files as few times as is absolutely necessary and
put a lot of stuff into memory arrays so it doesn't have
to go out again. With 8 pages x 112 objects you should be
able to run this inside the app and then call the update
routine only once.

2. use 'doevents' as often as possible so that i/o queues
don't back up (especially in embedded loops where you are
playing with external data). This can happen with ole
automation where the i/o may be coming from the ole server
and not necessarily from your app. it was the only way I
could get database performance up (access and sql server
local).

good luck, hope this helps,
al

Quote:
>-----Original Message-----
>I've created a VB solution that employs the Visio COM
>object to loop through and edit all objects on a
>given .vsd file. The code works great except that runs
>very slowly.

>Some information:
>* there are 8 pages with approx 112 objects per page
>* the Visio doc is set to invisible to maximize speed
>(Visio.invisibleapp)
>* the entire process takes upwards of 60 seconds to
>execute
>* VB.NET is the coding platform

>What options do I have to speed this process up? I have
>read other posts saying that the speed is determined by
>the OLE Automation and not by the screen redraw. Because
>of this, I have tried to minimize the code that modifies
>the .vsd in any way. The code is very brief.
>I have also looked into actually saving the .vsd file as
>a .vdx file and, instead of changing the actual Visio
>document itself, change the XML in the .vdx... this
>sounds good in theory, but there still seem to be
>problems with XML schemas created by Visio. Most notably,
>the error "The same table (table name here) cannot be the
>child table in two nested realations." which you get
>when, from .NET, select the Data view instead of the XML
>view.
>Any help is appreciated! Thx
>.



Wed, 16 Nov 2005 02:23:35 GMT  
 Visio.Application (COM object) Speed
If you haven't already tried this, try turning off ShowChanges at the
beginning of your code, and resetting it to its previous value at the end.
This can have a huge impact on perf.

--
Andy Howe
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> I've created a VB solution that employs the Visio COM
> object to loop through and edit all objects on a
> given .vsd file. The code works great except that runs
> very slowly.

> Some information:
> * there are 8 pages with approx 112 objects per page
> * the Visio doc is set to invisible to maximize speed
> (Visio.invisibleapp)
> * the entire process takes upwards of 60 seconds to
> execute
> * VB.NET is the coding platform

> What options do I have to speed this process up? I have
> read other posts saying that the speed is determined by
> the OLE Automation and not by the screen redraw. Because
> of this, I have tried to minimize the code that modifies
> the .vsd in any way. The code is very brief.
> I have also looked into actually saving the .vsd file as
> a .vdx file and, instead of changing the actual Visio
> document itself, change the XML in the .vdx... this
> sounds good in theory, but there still seem to be
> problems with XML schemas created by Visio. Most notably,
> the error "The same table (table name here) cannot be the
> child table in two nested realations." which you get
> when, from .NET, select the Data view instead of the XML
> view.
> Any help is appreciated! Thx



Sat, 19 Nov 2005 06:01:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Speed and Visio Application Scaling problems

2. COM objects and Visio 2002

3. Documenting COM object with Visio

4. COM objects and Visio 2002

5. speed difference between vbscript and vb com object????

6. speed difference between vbscript and vb com object????

7. Visio Automation - application object

8. COM-Object in ASP with COM-Object as parameter

9. COM-Object in ASP with COM-Object as Parameter

10. Access a COM object of a COM object?

11. Accessing a COM object of a COM object

12. com object will not read registry when com object called from asp (vb works fine)

 

 
Powered by phpBB® Forum Software