Slow dialer

Thomas Wood thomas at openedhand.com
Mon Mar 31 18:34:25 CEST 2008


So I followed up on this and tried some profiling on the device, as well
as removing the need for the stock_register functions. Here is a summary
of my initial findings.


Firstly, there is obviously some overhead to running strace on the
device, so the times in the graph are longer than the real time
experienced without strace.

The first graph (1-dialer-original.png) shows the dialer running on the
device without any profiling optimisations. Clearly this is very
different from the graph produced by running on the desktop I sent with
my last e-mail. The gtk_init() function now appears to take up the
majority of the loading time.

I removed the requirement to run moko_stock_register, as this had shown
to be a bottle neck in my previous tests on the desktop. The result
running on the device is shown in the second graph
(2-dialer-without-stock-register.png). Obviously this did not reduce the
total startup time by much, so I investigated a bit further and found
that moko_stock_register was causing the theme to be initialised. This
has now been pushed forward and is only initialised after the main
window is created. The initialisation of the theme itself takes about 1
second running under strace. Obviously there is work to be done here to
reduce the number and size of the files in the theme. Currently, a total
of 93 data files have to be opened and read to initialise the theme

Finally, with the help of my collegue Rob Bradford, we investigated why
gtk_init took so much more time to run proportional to running on the
desktop. After investigation, we discovered gtk_init was reading lots of
data from /dev/urandom, but we also discovered this didn't happen on the
desktop. Further investigation led us to find this was caused by a
function called gtk_migration_init(). This function does not appear in
GTK+ and is actually added by a patch in OpenEmbedded. I removed the
patch and the resulting start-up time can be seen in the third graph
(3-dialer-without-migration-patch.png). With the patch removed,
gtk_init() accounts for about 12% of the start-up time, as opposed to
65% previously.

The gtk-migration patch appears to be an old patch that GPE used to
enable a particular feature they wanted (to allow a panel applet to
migrate windows to different screens). This feature is not required in
OpenMoko, so I would suggest it be removed from the OpenMoko monotone
repository.

Now I can get to work investigation what can be done to improve the
start up time of the history widget (call log) and loading the journal.


Regards,

Thomas

-- 
OpenedHand Ltd.

Unit R Homesdale Business Center / 216-218 Homesdale Road /
Bromley / BR1 2QZ / UK             Tel: +44 (0)20 8819 6559

Expert Open Source For Consumer Devices - http://o-hand.com/
------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-dialer-original.png
Type: image/png
Size: 133389 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-devel/attachments/20080331/42b8b8ad/1-dialer-original-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-dialer-without-stock-register.png
Type: image/png
Size: 116203 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-devel/attachments/20080331/42b8b8ad/2-dialer-without-stock-register-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3-dialer-without-migration-patch.png
Type: image/png
Size: 54174 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-devel/attachments/20080331/42b8b8ad/3-dialer-without-migration-patch-0001.png


More information about the openmoko-devel mailing list