J
jeremy.J
Hi,
we developped a Visio addin for modeling electrical network.
This addin works well for drawing with hundreds of shapes but proves to be
very slow with the ultimate size we are targetting (about 3000 shapes).
Total time for opening the drawing is more than 50 seconds (it is almost
instantaneous whithout the add-in).
(100 % CPU usage for one of the dual core processors during all this time)
The environment I am using is :
Windows XP SP 3
MS Office Visio 2003
Compilation environment: MS Visual Studio 2003 (VB6)
Processor: Intel Core 2Duo
Using a code profiler I found out that most of the time is elapsed in our
"checkconnectivity" function which makes sure that all the connectors are
correctly connected.
One of the main functions of our Add-in is to propagate to a shape
connection point the information of which shape is connected on the other
side of the connector.
This information is stored in dedicated custom properties upon connection.
The check connectivity function sequentially calls the following functions
to make sure those information are correctly set :
Microsoft.Office.Interop.Visio.IVShape.get_Connects( ) is called 11,094
times for a total duration of 19.249 seconds
Microsoft.Office.Interop.Visio.IVShape.get_Cells(string
localeSpecificCellName) is called 11,094 times for a total duration of 16.120
seconds
This processing does not make any write call.
Are this performance normal ?
Would anyone have a solution to increase the performance of those calls ?
Thanks for your help.
we developped a Visio addin for modeling electrical network.
This addin works well for drawing with hundreds of shapes but proves to be
very slow with the ultimate size we are targetting (about 3000 shapes).
Total time for opening the drawing is more than 50 seconds (it is almost
instantaneous whithout the add-in).
(100 % CPU usage for one of the dual core processors during all this time)
The environment I am using is :
Windows XP SP 3
MS Office Visio 2003
Compilation environment: MS Visual Studio 2003 (VB6)
Processor: Intel Core 2Duo
Using a code profiler I found out that most of the time is elapsed in our
"checkconnectivity" function which makes sure that all the connectors are
correctly connected.
One of the main functions of our Add-in is to propagate to a shape
connection point the information of which shape is connected on the other
side of the connector.
This information is stored in dedicated custom properties upon connection.
The check connectivity function sequentially calls the following functions
to make sure those information are correctly set :
Microsoft.Office.Interop.Visio.IVShape.get_Connects( ) is called 11,094
times for a total duration of 19.249 seconds
Microsoft.Office.Interop.Visio.IVShape.get_Cells(string
localeSpecificCellName) is called 11,094 times for a total duration of 16.120
seconds
This processing does not make any write call.
Are this performance normal ?
Would anyone have a solution to increase the performance of those calls ?
Thanks for your help.