Improve performance of tags plugin by removing filtered model
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zim |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Performance of tags is terrible on a big notebook (about 300 pages but there is just only 4 tags in a few pages).
Each tag operation (selecting a tag in the tag cloud) takes about 10 seconds to complete at 100% cpu in a low power 400 MHz computer (N810 device)
Profiling shows there is about 5500 cursor executes for each operation, taking the lion's share of the cpu time.
Profile data:
Wed Jun 1 19:21:26 2011 profile-tags
372336 function calls (371074 primitive calls) in 153.164 CPU seconds
Ordered by: cumulative time
List reduced from 1426 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:
1 0.020 0.020 153.183 153.183 {execfile}
1 0.015 0.015 153.163 153.163 zim.py:3(<module>)
1 0.044 0.044 151.905 151.905 __init_
1 0.002 0.002 138.920 138.920 __init_
1 28.659 28.659 136.030 136.030 {gtk._gtk.main}
23/12 0.015 0.001 105.128 8.761 {method 'emit' of 'gobject.GObject' objects}
5 0.009 0.002 99.494 19.899 tags.py:
4 0.003 0.001 99.474 24.868 tags.py:
5 0.001 0.000 99.320 19.864 tags.py:
5 0.001 0.000 99.317 19.863 tags.py:
4 5.833 1.458 99.315 24.829 {method 'refilter' of 'gtk.TreeModelF
26213 9.813 0.000 86.792 0.003 tags.py:
22138 66.922 0.003 66.922 0.003 {method 'execute' of 'sqlite3.Cursor' objects}
7842 0.851 0.000 63.793 0.008 pageindex.
11879 5.162 0.000 60.562 0.005 index.py:
7104 1.308 0.000 18.868 0.003 pageindex.
1986 0.681 0.000 14.848 0.007 index.py:
1883 1.869 0.001 10.677 0.006 index.py:
1 0.018 0.018 8.884 8.884 __init_
11386 0.667 0.000 7.280 0.001 pageindex.
tags: | added: tags |
Changed in zim: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
summary: |
- tags: terrible performance + Improve performance of tags plugin by removing filtered model |
Changed in zim: | |
status: | Confirmed → In Progress |
Changed in zim: | |
status: | Fix Committed → Fix Released |
Can you also add zim version, python version, gtk version and platform ?
Thanks,
Jaap