
On Sat, 3 Jul 2004, bulia byak wrote:
Sure enough, 0.38.1's startup was significantly slower than previous releases. Good news it looks like CVS is much improved, although it's still slow compared with 0.37 and before.
Yes, there was an extremely stupid error that caused lots of unnecessary updates for groups and texts. I fixed it recently, hence the speedup compared to 0.38. But the slowdown from 0.37 to 0.38 was not caused by that update bug (it's present in all versions, inlcuding Sodipodi) but by the new renderer; if you fix the update bug in 0.37 it will also speed up twice or more. Optimizing the renderer is a big TODO item which I hope someone will tackle one day.
I profiled the loading of several of the tutorials. Here are the top 10 functions that required the most processing time when loading the Elements of Style:
% self time seconds name 10.46 0.50 nr_path_matrix_bbox_union(NRBPath const*, NR::Matrix const&, NRRect*) 6.28 0.30 Shape::SwapEdges(int, int) 5.02 0.24 IntLigne::Copy(FloatLigne*) 4.81 0.23 nr_curve_bbox(double, double, double, double, double, double, double, double, NRRect*) 3.77 0.18 NR::Point::operator[](unsigned) const 2.93 0.14 FloatLigne::InsertBord(int, float, int) 2.72 0.13 Shape::ConvertToShape(Shape*, fill_typ, bool) 2.51 0.12 rsvg_parse_path_data(RSVGParsePathCtx*, char const*) 2.51 0.12 Shape::SwapPoints(int, int) 2.09 0.10 Shape::Avance(int, int, Shape*, int, Shape*, Shape*, bool_op)
For this test case, it looks like the various routines in Shape:: are where a lot of time is spent.
For the other test cases, the order and magnitude changes, but these same routines are seen. Shape::SwapEdges and IntLigne::Copy show up in the top five in all the profiling runs, although they're rarely the first in the list. The top twenty list has a lot of various Shape:: calls.
Anyway, looks like there's a number of places where optimization could pay off, but the Shape class in general looks like it could use some attention.
Bryce