Hi!
I create this new thread because the original one was not really about this, so please read that thread for some details, particularly my previous mail: http://lists.uvena.de/pipermail/geany-devel/2010-November/003567.html
Although I know it's probably not the best time for such huge changes (Christmas and release coming soon, ...), but now's the news, now's the mail :)
So, now the interesting stuff.
As you (might) already know, I've got the tagmanager to work in memory, opening a little more the way to real-time symbols updating. For convenience, I join the patch here (can be found in the previous thread) as 0001-First-tagmanager-move-to-MIO-I-O.patch.
From here, the next step is to use the in-memory capabilities and
reparse in (almost-)real-time. Here comes two more patches:
1) 0002-Enable-in-memory-tag-parsing.patch which is really tiny and enables in-memory tag parsing
2) 0003-Update-tag-list-on-IDLE-time-right-after-any-documen.patch which updates the tag list on IDLE time after any change in the document. This patch is not really good (allowing a timeout and a user setting would be probably a good idea), but it is here mostly for being able to test.
So with these on, you can test the in-memory tag parsing, and notice that... it updates in real-time, yes, but the symbol list flickers a lot, and it's very annoying. So here comes 5 (!) more patches:
1) 0004-Improve-implementation-of-hide_empty_rows-to-do-all-.patch: this one is not needed, simply improves the implementation of hide_empty_rows() -- note that it may be applied alone too;
2) 0005-Make-TMTag-reference-counted.patch and... 3) ...0006-Provide-a-GType-for-TMTag-and-use-it.patch: these two makes TMTags reference-counted and add a GType for them, allowing the tree tag store to keep a reference to them, so they never become invalid. I needed it for the implementation of the last patch, read ahead;
4) 0007-Don-t-remove-and-add-the-symbols-tree-view-if-we-re-.patch: this ones avoids removing and re-addind the tag view upon update if the final state is the same as the original one, avoiding a part of the flickering. Note that it applies alone as well;
5) and finally, 0008-Update-the-symbol-list-rather-than-clearing-and-re-b.patch: this is the huge part of the thing: it re-implements tag store updating to avoid clearing and re-filling the list, rather updating the rows when possible. Apart avoiding flickering, this also keeps user's selection and folding :) As you might read at the top of the patch, this implementation is probably not the better possible, but avoids lot of refactoring in a code I'm not sure to understand perfectly well (add_tree_tag()) -- note that I suggest another implementation in the patch's comment, and I have a working sample (but not with the symbol list...) if somebody's interested. About this patch, there is a question (as a FIXME in the patch): why did you detached the tag store from the tag view before updating it? Was it for performance reasons or what? I dropped this since it (obviously) led to flickering, and it seems to work well, but I'm wondering.
Well! If you apply all these patches, you should have a working, real-time, in-memory tag parsing that should look good :)
So, what's left? Testing of course, lot of it. Also, for now it doesn't update tag list before the first save (for new documents). I've not investigating the issue yet though.
So I'll stop here, thank you for your time reading and let you test this, right? :)
Regards, Colomban
PS: for the inpatients of you, I included a patch (0000-In-memory-tag-parsing-all-together.patch) that combines all the 8 patches together.