Hi All,
I did a step back and got some numbers (what! hard evidence in the discussion? :)
Using ctags, including locals in the tags generated from Geany source, slightly more than doubled the number of tags, and for some C++ I have around nearly four times the number.
For Geany bsearching a sorted array, four times the size is only two more iterations, doesn't matter :)
But as Colomban pointed out, with real-time tag generation on, *most* lookups will be from the parser, not Geany. This is needed to see if the name it found is a type so it can tell the statement is a declaration. (c.c does not do this at the moment since it only looks at top level statements and all top level statements are declarations in {} languages).
That workload *will* be proportional to the file size. And the number of insertions will also be proportional to the file size. This is a big change from the current situation where parsing occurs rarely.
For a simple array structure then, whilst parsing, either the search is linear, or the array is re-sorted on each insert, neither is an attractive prospect for larger files with 4* the number of tags.
Also on examining the tags file ctags produced I found that local variable entries did not actually get parsed, ie there was no way to go from a local variable to its type. All that happened was an occurrence of the name was recorded. Also no information about lexical scope is recorded. So even updating to ctags c.c wouldn't give the information on local variables we need to handle the example I posted earlier.
So although improving tagmanager/Colomban manager is still worthwhile, significantly more work is needed on the parsers as well.
And in terms of handling local variables properly and allowing contextual completion ctags looks like a dead end.
Cheers Lex