[Github-comments] [geany/geany] tm: Cleanup include lookup (#1991)

Colomban Wendling notifications at xxxxx
Sat Nov 10 11:34:10 UTC 2018


Don't use the files inode as the hash.  Although it looks like a good idea for de-duplicating links as well, it has several issues, including non-uniqueness of inodes across file systems.
The way it was done hashing the inode but comparing the file name string pointers also made the hash mostly irrelevant, as it just stored filenames sharing the same inode in the same hash bucket but without
actually doing any de-duplication, making the whole thing a convoluted way of converting to a list.

Instead, hash and compare the filenames themselves, which, even though it doesn't handle links de-duplication, is better than the non-functional previous code.

Also, directly build the list and only use the hash table as a way for checking for duplicates, which is both faster and gives a stable output.

See #1989 
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/1991

-- Commit Summary --

  * tm: Cleanup include lookup

-- File Changes --

    M src/tagmanager/tm_workspace.c (18)

-- Patch Links --

https://github.com/geany/geany/pull/1991.patch
https://github.com/geany/geany/pull/1991.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1991
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20181110/3422db3d/attachment.html>


More information about the Github-comments mailing list