Journal activity profiling

riccardo riccardo.lucchese at gmail.com
Tue Aug 12 06:10:30 EDT 2008


Hi!

Testcase:
Fill the journal with hundreds of entries and automate the
GtkScrollWindow in the journal to scroll one entry at time on a timeout.

Build: joyride-2281



 + Macro investigation of cpu usage
A picker graph taken during the test can be found at:
http://dev.laptop.org/~rlucchese/journal_scrolling/journal_scrolling.picker.svg
(http://dev.laptop.org/~rlucchese/journal_scrolling/journal_scrolling.picker)

The following tab shows cpu usage of the 4 processes that took more cpu
time during the sampling time:
($ grapher -c4 -n -r cpu -i journal_scrolling.picker)
  
 tot%	ps%	cmdline
 -----------------------
        68.2    python /usr/bin/sugar-activity journalactivity...
 88.6   20.4    /usr/bin/X :0 -fp built-ins -wr ...
 94.3   5.7     picker
 99.5   5.2     python /usr/bin/datastore-service

>From the interactions with X it seems the journal activity spends a
sensible amount of time redrawing its entries.

The test runs slower when the journal has more entries than when it's
almost empty, why is it ?



 + cProfile statistics (KCG format) for the journal activity:
http://dev.laptop.org/~rlucchese/journal_scrolling/journal_scrolling.cProfile

functions ordered by self-time:
 17.2   gtk.main()
 16.5   cairo.Context.paint()
  4.    find in gettext.py
  3.9   set._jobject of Journal.activity/collapsedentry.py::228
  2.9   built-in method do_size_allocate
  2.9   _expand_lang gettext.py
  2.8   join in posixpath.py
  2.6   posix.stat()
  2.1   _update_color of Journal.activity/collapsedentry.py  
  1.7   normalize in locale. py
  1.6   exists in posix.path.py
  1.5   set._jobject of Journal.activity/collapsedentry.py::323
 --------------------------------------------------------------
  59.8%
  
I find interesting to note that 28.5% of the total time goes to
`get_date' of Journal.activity/misc.py because of the ngettext overhead.
Perhaps translations could be cached ?
 


 + Sysprof statistics:
http://dev.laptop.org/~rlucchese/journal_scrolling/journal_scrolling.sysprof

Not very interesting this time.


Thanks,
riccardo




More information about the Devel mailing list