> I really like that idea j, but I do think the complete-as-you-type might be 
> tractable with the right data structure. Since the search is currently only 
> happening over package names, imagine a tree for package names where each 
> layer is a letter in the name. So, if a user types in abc, I take the a 
> branch, then  the b, then the c branch. Once I get there, I determine the 
> number of answers that can be shown on the screen at one time, and traverse 
> the tree alphabetically to find the first N answers under abc. Other than 
> holding that tree in memory, I think that design scales. And my guess (and 
> it's only a guess) is that by using lists cleverly, we can probably store a 
> fairly large number of packages efficiently in that structure w/out a huge 
> memory hit.

You're proposing something like a PAT tree where we traverse the tree
for prefix and then find all the strings that match beneath our current
node?  That seems reasonable to me, but I'm not an expert with those
kind of data structures.

-j

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to