emposha / FCBKcomplete

Jquery facebook like(fancy) multi-select
http://www.emposha.com
383 stars 115 forks source link

Search is too slow for 4000 odd records #92

Open pratikt opened 12 years ago

pratikt commented 12 years ago

I am using FCBKComplete and it s a fantastic tool. But the problem is that it really slows down if my database is 4000+ records.

I would really appreciate if this can be looked into.

Thanks

orefalo commented 12 years ago

This should be a server optimization algorithm, you can expect the author to look into this issue.

Either cache the records, index them or think about a better lookup strategy. For instance you may decide to display choices once the 3rd chars is typed in.

pratikt commented 12 years ago

Hi orefalo,

Thanks for your input.

I have already implemented your suggestions like cache & to display choices after the 3rd character is typed in.

No help. Its just that filtering through the json file with 4000+ records is very slow.

orefalo commented 12 years ago

I am afraid this plugin may not be the best solution for what you are trying to achieve. Actually thinking about it, I don't think JS or even web technologies is the right solution either. Thinking about it.. you are passing 4k+ json records on every key stroke. How do you want it to perform ? You have to find a way to reduce that number significantly. Worst case it may just mean that the auto-completion is not an option.

Another idea: compute best hit lists on the server. and show the 10 best matches.

pratikt commented 12 years ago

hmmm ok

sql search in that case would be another good option

Thanks for your inputs. Really appreciate it.