Author Topic: Size and complexity vs performance  (Read 205 times)

0 Members and 1 Guest are viewing this topic.


  • Jr. Member
  • **
  • Posts: 12
Size and complexity vs performance
« on: June 04, 2020, 03:46:36 AM »
I was trying to find anything related to a drawing performance, and what can have a effect on it.
At first I was thinking that surely a shape made with "ElipticalArcTo" will be drawn slower than very similar one with  "Polyline",
because (assuming "ElipticalArcTo" uses some sort of NURBS to draw a shape) each pixel needs to be calculated with bigger complexity than a straight line.

So my drawing have around 200-250 of shapes that uses Arcs and at least 1000-1500 circles and equal amount of simpler shapes.
I didn't tested yet how it affects Visio performance - I suppose it is negligible - but when it is not?
Around 3000 complex shapes, 5000?
Other related question.
When the formulas in shapes are updated?
I have created simple clock (for practice/learning purpose) without any VBA or Events, it only uses NOW function.
What i have discovered is that my clock is updating its fields periodically even if I don't directly work with it.

I assume Visio checks all the fields for all shapes with internal clock/event handler, and if necessary updates what is needed.
If so - is it better to follow DRY (Don't Repeat Yourself) principle of writing formulas, and also reduce amount of Fields in a shape?

in first example ShapeText() is evaluated twice, in second in theory too, but now there are 3 fields that needs to be checked.
When I should really worry about performance drawing?
And how does Visio handle field evaluation?
« Last Edit: June 04, 2020, 04:01:53 AM by Machine »