gnote performance

I’ve been using gnote as my daily job status tool for a few years now, and it’s great.  I love it.  I have 900+ notes.  But every day when I create a new note it hangs for 10 seconds, and again after typing the note’s title and hitting return.  This machine isn’t slow (Core 2 Duo 1.86GHz) so it’s got to be gnote.

So we fire up sysprof.  And for both operations (creating a new note, changing the title) we find the culprit to be the add_keyword() function, called from gnote::TrieController::update().  It appears to be mostly add_match_at_state() checking for equality of something.  Full sysprof data available upon request.

I like gnote a lot; this is a minor annoyance but one I hit every day.  If anyone optimizes this I will owe you something, and I’m a great person to have owing you something.