DataSourceRegistry is a huge performance bottleneck
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_
PYTHONPATH=. python /tmp/test_
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
- Mikkel Kamstrup Erlandsen: Approve
- Markus Korn: Needs Information
- Seif Lotfy: Approve
-
Diff: 194 lines (+48/-32)4 files modified_zeitgeist/engine/extension.py (+11/-1)
_zeitgeist/engine/extensions/datasource_registry.py (+21/-24)
test/remote-test.py (+2/-0)
zeitgeist-daemon.py (+14/-7)
Changed in zeitgeist: | |
assignee: | nobody → Siegfried Gevatter (rainct) |
importance: | Undecided → Medium |
milestone: | none → 0.7.0 |
status: | New → In Progress |
Changed in zeitgeist: | |
status: | In Progress → Fix Committed |
Changed in zeitgeist: | |
status: | Fix Committed → Fix Released |
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).