Comment 17 for bug 624310

Revision history for this message
Seif Lotfy (seif) wrote :

So i created a shitty extension too see how much memory consumption happens before things are sent over dbus.
The idea is I ask for ALL events directly from the engine, 10 seconds after zeitgeist starts
Here are my observations

find_eventids: starts with 16.8 MB and end up with 25.4 MB

find_events: starts with 16.8 MB and end up with 106.2 MB

I think for the first case we cant do much
However for the second case we need to reduce the memory footprint of the Event and Subject in our datamodel. Maybe by using the __slots__

I also wrote 2 scripts one in python and the other in Vala... Both connect to the DB and ask for all ids.
Observations are vala uses 6.6 MB and python 12.9...

Maybe we can write our own cursor around the sqlite in C and create bindings for it to allow us to play with the memory and instead of returning lists in fetchall we can make it return tuples