atg / Ingredients

A Cocoa documentation viewer.
http://fileability.net/ingredients/
Other
516 stars 37 forks source link

camel case search support #27

Open jonah-williams opened 13 years ago

jonah-williams commented 13 years ago

I would like to see Ingredients support searching for class names using camel case abbreviations. For example "NSMD" or "NSMutD" should find "NSMutableDictionary". Such behavior is available in Xcode and many other editors and makes quick navigation much easier.

atg commented 13 years ago

I would love to be able to do this. Unfortunately I have no clue how to.

There can be on the order of 20k to 50k symbols in the database, and searching has to complete in a fraction of a second (0.1s is about the sweet spot). Then there's the additional problem that a larger result set means more time spent ranking the results. So I don't know how to do this without making Ingredients unacceptably slow (it's already bad enough).

It would seem to require some data structure that is optimised to quickly find the subset such that the longest common subsequence is greater than some N.