Visio ActiveX performance

G

Gary

I am using the Visio ActiveX control and have embedded it
into our application. We were very happy with the control
acting as a schematic tool for the development of symbols
and to build 2D fluid networks (consisting of pipes and
pumps etc etc) until we did some performance tests. We
found that if we have about 1500 objects (simple coloured
rectangle shapes) on the screen and we tried to update
the colours of the objects and the associated text it
took about 50 seconds on my machine (512meg, 3Ghz
Pentium). This is important as we need to dynamically
colour parts of the 2D network when we run a transient
simulation and we need to be able to quickly recolour
some of the objects on the screen.

We have tried to speed up this action by turning off
screen refresh and the events. We have also tried locally
storing shapesheet info, but have had no luck in
improving performance.

This is very important to us, we are currently evaluating
software that we could use in our application as a
schematic tool and the Visio activeX control was top of
the list, presently it looks like this issue is a show
stopper and we may have to look elsewhere. I am very
aware of our lack of experience using the Visio control
and object model and am trying to make sure that we dont
miss anything.

I would be very grateful for any assistance and ideas

many thanks
 
M

Mark Nelson [MS]

How are you managing these objects and how many calls are you making to
Visio to change the color? You can do it with a single call that should
result in a very fast update. The slowest part of any app will be the calls
across an automation interface, so you definitely need to minimize those.

Are all of the shapes instances of a Visio master? You can then just change
the color of the master and all the instances will update. Even if the
shapes derive from more than one master, you can create a fill style that
they all use and then just change the color of the style.
 
G

Gary

Hi Mark,

thanks for the responce. I guess the problem I have is
that potentially (most likely) each one of the shapes
will have a different colour and or text associated with
them, so I am having to reference each individual shape
instance to change the colour and text. The reason I have
to do this is that for our product we need to report (on
screen) the pressure and or heat flow associated with the
component in a fluid power network. This means that each
object shape will need to be modified for its own values.
This is useful visual info for the user during a
transient simulation and as such each component will need
to updated, individually, pretty rapidly.

Any thoughts

regards,

Gary
 
M

Mark Nelson [MS]

Good reasons. Given the number of shapes you are talking about, I would
experiment with hanging on the Visio shape objects versus retrieving a shape
object when you need it. While you may think that it is faster to hang on
to 1500 objects, that creates a lot of work for Visio to maintain those
object instances for you. Try it both ways.

Another method to look into is SetFormulas. This is a bulk operation method
that lets you send an entire array of cell changes to Visio at one time.
 
J

Jeff Bennett

Gary,

This is in response to your newsgroup message ( below )

Would you consider an alternative to Visio?

Our MetaDraw control
a) Is great for diagrams
b) is royalty free
c) is fast - you can change the Text of 1500 text objects
and line color of 1500 rectangles in under a second

Details about MetaDraw are available at www.Bennet-Tec.Com

MetaDraw is RELIABLE - in use by thousands of programmers
world wide for commercial and mission critical applications
since 1995. We offer a 30 day trial before purchase.
We offer a 30 day satisfaction guarantee after purchase.

I don't check this newsgroup often so please
drop me a note by direct e-mail if you are interested.
I'd be happy to send details, answer any questions

* * Please include a copy of this note with your reply

Jeff Bennett
(e-mail address removed)

Bennet-Tec Information Systems, Inc
50 Jericho Tpk, Jericho, NY 11753
Phone 516 997 5596, Fax - 5597
WWW.Bennet-Tec.Com

RELIABLE Component Software
and Software Development Services
* TList/Pro * ALLText HT/Pro * MetaDraw *

====================== ======================
 
M

Mai-lan [MS]

One other thing to add: There is a known performance issue (significant
slower performance) with the ActiveX control and shapes with gradients. The
workaround is not to use shapes with gradients.

Thanks,
Mai-lan
Microsoft Corp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top