Bluefish startup time

In Bluefish, Gnome, open source, Programming on September 16, 2011 by oli4444

It seems to be trendy to blog about startup times. So lets talk about the recent changes bluefish startup time. So what caused the changes? The current subversion trunk compiles on gtk-3, while the latest stable release (2.0.3) did not, most notably because it uses GtkItemFactory to generate menu’s. I did several optimizations for the new code already: I moved all the bluefish-specific stock icons  from external png files to inline-pixmaps to reduce the file seek times, and I changed from seperate toolbar and menu definition files to a single file again to reduce the disk seek times.

So is the new gtk-3 compatible version faster? Both versions built against the same gtk-2 release shows that the old version was faster. On my development machine (core 2 duo 3.1 GHz) the time is too short to see a real difference (total startup took 0.6 s) So I tested this on an older computer (IBM T43 laptop with 1.8GHz Pentium M and a SSD) to make it easier to measure the startup time. I measured several times to make the results more accurate:

GtkItemFactory uses a struct that is directly compiled into the binary. GtkUIManager uses a XML format that first needs to be parsed. In Bluefish we load this file from disk which adds some seek time (but the laptop has a SSD so that should not be much). Could this change be the cause of the 0.3 s difference?

Luckily not everything is slower, the syntax scanning speed has increased a lot over the last releases. This is measured on the same laptop:

Given that the scanner engine did spend close to 50% of it’s time settings GtkTextTag’s (see the Bluefish editor widget design) the boost is pretty impressive.


One Response to “Bluefish startup time”

  1. Hey why just no fixing the problems in gtksourceview? To me you are doing almost the same.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: