Couple of comments/questions

1. after the patch it still goes through strlen characters and computes the 
hash (at least up to maxlen)
2. so computing the hash is unlikely to be the issue since it still happens 
with the patch, 
3. I am not sure about the characteristics of the hash implementation with  
unruly input, does it limit the chain lengths, or can they extend up to the 
maximum load factor?
4. if the chain lengths can grow long then the cost of 
[strcasecmp](https://github.com/geany/geany/blob/dea43baf477ab71650cdfc54fa976714def9c170/ctags/main/keyword.c#L171)
 will dominate since it is slow, having to apply tolower on both strings before 
comparing, and IIRC SQL is case insensitive.
5. why the **** is the problematic code searching the hash each character in 
the first place? Why not scan input until the next end of word and search for 
that word once?

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

Message ID: <geany/geany/pull/3433/[email protected]>

Reply via email to