GNOME Bugzilla – Bug 660663
Optimize note creation, renaming and deletion
Last modified: 2011-10-11 20:33:53 UTC
Created attachment 197988 [details] placeholder.note: needed to create set of random notes With a large number of notes, Gnote becomes very slow at creating, renaming and deleting notes. First, there is no need to throw away the whole trie and re-create it from scratch when a new note is being created. The title of the new note can be added to the existing trie. Secondly there is no need to throw away and re-create the Gtk::ListStore within the recent changes window from scratch when a note has been created, renamed or deleted. Instead, the existing model can be edited. How to reproduce: 1) Start with an empty ~/.local/share/gnote directory. 2) Use the following shell script and the attached placeholder.note file to create 3000 notes. num=0 until [ $num -gt 2999 ]; do title=$(pwgen -N 1 24) sed -e 's/NOTE_NUMBER/'"${title}"'/g' placeholder.note >$num.note num=$((num+1)) done 3) Compile Gnote from Git and run it (as: $ /opt/bin/gnote), so that the recent changes window (titled "Search All Notes") opens up. 4) Create a note. There is a significant delay before the new note shows up. 5) Change the title of the note and hit enter at the end of the title line. Signicant delay before the cursor moves to the next line. 6) Delete the note. Again, a similar delay.
Created attachment 197989 [details] [review] Optimize note creation, renaming and deletion
The same issues exist in Tomboy too and they should be notified.
Running with this patch for a few days and it's a lot faster with my ~1200 notes. Haven't noted any regressions though I don't typically bang on gnote a lot, just note creation, renaming, and searching.
I see, that Debarshi pushed this into git. Closing the ticket. Will be in 0.8.1.
Just filed a Tomboy equivalent at bug #661491. Thanks guys!