DataSourceRegistry is a huge performance bottleneck

Bug #695311 reported by Markus Korn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Framework
Fix Released
Medium
Siegfried Gevatter

Bug Description

I was wondering today why the timings for inserting events when running our testsuite (or my benchmark scripts) are looking much better than the timings in a 'real' daemon instance.

Some Data:
  * inserting 500 events at once in my benchmarks: ~0.09 sec
  * inserting the same 500 events at once in a 'real' zeitgeist session: ~0.185 sec

You can reproduce this tests by running the attached script like

ZEITGEIST_DEFAULT_EXTENSIONS="_zeitgeist.engine.extensions.datasource_registry.DataSourceRegistry" PYTHONPATH=. python /tmp/test_insert_events.py

PYTHONPATH=. python /tmp/test_insert_events.py

and compare outputs.

To simulate the scenario of multiple running instances of the same application, uncomment the lines 26+ in the script, you will get even worse results.

Related branches

Revision history for this message
Markus Korn (thekorn) wrote :
Revision history for this message
Siegfried Gevatter (rainct) wrote :

Yup, that is because it updates the "last seen" time and writes the change to disk. I guess it should only write down this information before Zeitgeist ends (and if it dies and doesn't get to write it, that isn't a big problem).

Changed in zeitgeist:
assignee: nobody → Siegfried Gevatter (rainct)
importance: Undecided → Medium
milestone: none → 0.7.0
status: New → In Progress
Revision history for this message
Seif Lotfy (seif) wrote :

I am very happy with rainct's fix and would like to have the fix merged
https://code.launchpad.net/~zeitgeist/zeitgeist/bug695311

Seif Lotfy (seif)
Changed in zeitgeist:
status: In Progress → Fix Committed
Seif Lotfy (seif)
Changed in zeitgeist:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.