Inkscape Startup Times
--------------------- Real Time (s) ---- Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average ============================================================== 0.35 0.125 0.119 0.118 0.119 0.120 0.120 0.36 0.142 0.140 0.142 0.144 0.151 0.144 0.37 0.200 0.195 0.193 0.196 0.195 0.196 0.38.1 2.289 2.317 2.297 2.303 2.309 2.303 CVS 0.720 0.725 0.727 0.732 0.720 0.725
--------------------- User Time (s) ---- Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average ============================================================== 0.35 0.096 0.092 0.091 0.094 0.098 0.094 0.36 0.117 0.111 0.119 0.114 0.113 0.115 0.37 0.166 0.166 0.170 0.172 0.162 0.167 0.38.1 2.216 2.228 2.223 2.233 2.244 2.229 CVS 0.645 0.652 0.665 0.654 0.645 0.652
--------------------- System Time (s) ---- Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average ============================================================== 0.35 0.014 0.013 0.016 0.014 0.010 0.013 0.36 0.011 0.016 0.011 0.013 0.016 0.013 0.37 0.026 0.022 0.021 0.016 0.025 0.022 0.38.1 0.040 0.036 0.034 0.036 0.031 0.035 CVS 0.046 0.035 0.034 0.046 0.044 0.041
I got curious about startup times, from bug reports that we've gotten from 0.38.1 users. I downloaded all the past Inkscape releases and replaced their gtk_main() call with exit(), and timed how long each took to get to that point.
These tests were run on a 3GHz P4 with 512K cache and 1G RAM.
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.
Bryce
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.
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
Ted was curious what impact the build_module_from_dir in init.cpp had on startup times, so I commented out and did another timing:
real 0m0.681s user 0m0.637s sys 0m0.035s
So about 0.04s of real time... not really worth worrying about, esp. since it only occurs during startup, although if it grows as more extensions are added, maybe it'd be worth keeping an eye on. I think Bulia's right, though, that it's the renderer where optimization focus is needed.
Bryce
On Sat, 3 Jul 2004, Bryce Harrington wrote:
--------------------- Real Time (s) ----
Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average
0.35 0.125 0.119 0.118 0.119 0.120 0.120 0.36 0.142 0.140 0.142 0.144 0.151 0.144 0.37 0.200 0.195 0.193 0.196 0.195 0.196 0.38.1 2.289 2.317 2.297 2.303 2.309 2.303 CVS 0.720 0.725 0.727 0.732 0.720 0.725
--------------------- User Time (s) ----
Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average
0.35 0.096 0.092 0.091 0.094 0.098 0.094 0.36 0.117 0.111 0.119 0.114 0.113 0.115 0.37 0.166 0.166 0.170 0.172 0.162 0.167 0.38.1 2.216 2.228 2.223 2.233 2.244 2.229 CVS 0.645 0.652 0.665 0.654 0.645 0.652
--------------------- System Time (s) ----
Inkscape Run 1 Run 2 Run 3 Run 4 Run 5 Average
0.35 0.014 0.013 0.016 0.014 0.010 0.013 0.36 0.011 0.016 0.011 0.013 0.016 0.013 0.37 0.026 0.022 0.021 0.016 0.025 0.022 0.38.1 0.040 0.036 0.034 0.036 0.031 0.035 CVS 0.046 0.035 0.034 0.046 0.044 0.041
participants (2)
-
Bryce Harrington
-
bulia byak