Suggestions for improving performance

G

geejay

I have already posted here for general performance suggestions, but I cant
seem to get any further.

I have an add-in written in .NET (C#). It currently takes ~3 minutes to go
from an XML file (which contains all the info I need to draw something in
Visio), to a drawing in Visio.

Here's what I do:

1. Dump a whole bunch of masters on the page.
2. Organise them into sub-shapes, contained shapes, etc.
3. Do some grouping.
4. Use Visio's layout functionality to nicely move shapes into a horizontal
layout.
5. Ungroup all the shapes
6. and then do a process I call clustering, which
basically makes sure that i can box N shapes without the box containing
any other shapes (i.e isolating all other shapes from that box).
7. Move all shapes to fit the page (I do this because I found no good way of
resizing the page to fit (nicely) all the shapes inside. The provided visio
Fit To Page feature doesnt work properly. So what I do is move all the shapes
so that the top left shape is at 0,0.

All shape cell access (i.e moving shapes) is done through
get_cellsSrc(address), one move at a time.

Here's what I have thought about already:

1. Buffering, I have written a buffer for pin values, when performing the
clustering step, as this requires lots of shape moves. But it doesnt seem to
save me that much.

That's about it.

Thanks for any tips guys.
 

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