Journal activity profiling
Tomeu Vizoso
tomeu at tomeuvizoso.net
Wed Aug 13 12:02:49 EDT 2008
On Wed, Aug 13, 2008 at 5:20 PM, riccardo <riccardo.lucchese at gmail.com> wrote:
> On Wed, 2008-08-13 at 12:13 +0200, Tomeu Vizoso wrote:
>> On Tue, Aug 12, 2008 at 12:10 PM, riccardo <riccardo.lucchese at gmail.com> wrote:
>> > 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
>
>> > The test runs slower when the journal has more entries than when it's
>> > almost empty, why is it ?
>>
>> Not sure, perhaps because there are more entries in the DS so the
>> query takes more time? Can you check?
> I cannot reproduce it by just adding more objects to the DS. I think I
> had `particular' objs in the journal when I saw it: ie. if I only
> push .xo packages to the DS the journal scrolls very slowly (after
> activities get installed)
Yeah, we need to read the bundle id and version number from inside the bundle :/
>> >
>> > 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 ?
>>
>> Totally, but caching should already happen inside python's gettext:
>>
>> http://svn.python.org/view/python/tags/r251/Lib/gettext.py?rev=54864&view=markup
>>
>> If that isn't working for any reason, we would need to cache it
>> locally in sugar.util. Can you check it is slow in Spanish as well?
>> You may have found a very nice low hanging fruit ;)
>
> I can see similar percentages with spanish (perĂ¹) translations ;)
>
> Note that only the comboboxes entries get translated, the timestamp gets
> always shown in english.
Ouch, that's bad. What I think it's going on is that missing
translations are not cached, so any missing translation will go all
the way down again and again.
We need to check why we are not picking up the translations. Can you
enter a ticket for 8.2.0 and make it a blocker? Would be nice if you
can already tell where's the problem - and a patch would be awesome ;)
Thanks,
Tomeu
More information about the Devel
mailing list