> -----Original Message-----
> From: Engelen, J.B.C. (Johan)
> Sent: maandag 16 juni 2008 17:45
> To: 'bulia byak'
> Cc: Anhalter42@...; inkscape-devel@...
> Subject: RE: [Inkscape-devel] Startup slowdown caused by
> > -----Original Message-----
> > From: bulia byak [mailto:buliabyak@...]
> > Sent: maandag 16 juni 2008 17:14
> > To: Engelen, J.B.C. (Johan)
> > Cc: Anhalter42@...; inkscape-devel@...
> > Subject: Re: [Inkscape-devel] Startup slowdown caused by
> > nr_arena_updates?
> > On Mon, Jun 16, 2008 at 10:27 AM,
> > <J.B.C.Engelen@...> wrote:
> > > I changed bbox calculation to use the 2geom path instead of
> > NArtBpath.
> > > I'll do some tests whether this is much slower. Right now I am
> > > thinking this is very bad news for my project: it might
> > mean that path
> > > transformation (operator*) is significantly slower in the
> 2geom lib
> > > than NR lib...
> > No need to despair - there was simply no motivation so far
> to speed up
> > 2geom. Now this motivation is aplenty. I also noticed the slowdowns
> > during work; part of them (during
> > transformations) I traced down to path data writing and reported to
> > Jasper who was looking into it, but part is also
> undoubtedly blameable
> > on 2geom. So let's make this a call to arms for all 2geom devels to
> > make 0.47 not a bit slower - and ideally faster - than 0.46.
> Thank you for your positive note Bulia!
> I was a bit unfair... the "slow" function used to use the
> rough bbox at first (defined by the handles of the path),
> instead of the exact bounding box. So I changed that in the code now.
> Still, operator*(Geom::Path, Geom::Matrix) is a "slow"
> function, and a lot of time is spent there. So we could try
> to focus optimizing attempts there.
>(I like -pg and gprof for profiling!)
The above was false, Inkscape 0.46 *does* use the exact bounding box in
that method, so I changed that back.
I have refactored the bbox calculation for transformed paths and it is a
lot faster now. To conclude I think the huge speed improvement comes
1 - no longer generating transformed path, but taking separate points
and transforming those
2 - use optimized bbox calculation for straight line segments and cubic
segments, instead of the default root finding algorithm.
Now, Inkscape is super fast starting up. Might be worth doing a
measurement against Inkscape 0.46, to see how it compares.
(and now I absolutely love -pg and gprof for profiling!)