[Geany-devel] Real-time tag parsing (again) (was Geany FTW - better autocompletion)

Colomban Wendling lists.ban at xxxxx
Fri Feb 18 19:22:35 UTC 2011


Le 19/12/2010 16:05, Colomban Wendling a écrit :
> [...]
> 
> 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.
I found a few days ago that my first implementation had serious
performance problems with very large token trees [1]. So, there is a
patch to improve it (it's still not the implementation I suggested
originally, but simply an improvement of the current one), and it is now
significantly better [2].


So here's the patch (yet another one :D).

Cheers,
Colomban


[1] e.g. a 8000+ lines Vala VAPI file with 6000+ tags took 18s (!!) to
update, and a 64000+ lines C file with 9000+ tags took about 10s to update

[2] same files now takes about 250ms for the Vala file and the C one
1600ms (not that good, but it's 64k lines...).
Note that with unmodified version of Geany, the same thing takes
respectively 400ms and 2700ms, so there's a benefit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Improve-performances-of-symbol-list-updating.patch
Type: text/x-patch
Size: 4734 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20110218/bcb1b76f/attachment.bin>


More information about the Devel mailing list