[Github-comments] [geany/geany] Enable local variables for C/C++ and improve autocompletion (PR #3185)

Jiří Techet notifications at github.com
Mon May 2 21:33:11 UTC 2022


@kugel- All I want is to have the header stuff discussed **now** so I know what you think is wrong about it. It means some extra work for me and if it turns out that the discussion evolves into "let's leave it the way it is" then the work is wasted. This is why I'm not really thrilled about comments like "Please separate PRs" without proper discussion about what you think is wrong, what you'd suggest to change or whether you want to scrap the feature altogether. I'm totally fine to rework the patch, separate it to a new PR or scrap it if it turns out not to be a good idea but **after** a proper discussion and not just because someone orders me to do so.

If your primary concern is performance, I suggest to change the implementation so we add a hash table `file_name -> TMSourceFile` to `TMWorkspace`
https://github.com/geany/geany/blob/55aea4cb243decf288b7ae0c397a120d6c5b806a/src/tagmanager/tm_workspace.h#L27
so we have a fast access to `TMSourceFile` based on file name. Then we can perform a fast lookup of a header (constructing possible header candidates using common C/C++ header extensions and looking them up in the hash table - that is 6 lookups for the headers I used which is super-cheap) and this could also serve for included file lookups if we start using the include tags.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3185#issuecomment-1115391282
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3185/c1115391282 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220502/1c38de0d/attachment.htm>


More information about the Github-comments mailing list