Closed wilson29 closed 13 years ago
The speed increase will definitely be nice in the long run. Now the only latency we should notice will be round trip time, which will hopefully be negligible. It would be really cool to get the better search working, we should definitely look into it.
I agree, the speed increase in this will definitely be noticeable to using the form.
Also, Scheedule's autocomplete is blazingly fast which makes me think that it is being sent locally.
If we can't match the speed using autocomplete remotely, should we do it locally? (send the browser a javascript array of all possible class names)
So guess what, I made autocomplete 8-10 times faster. I used something called redis. Just think of it as a hash.
Basically, I store everything we need for the autocomplete search in a hash. Since it's in memory we do no database queries.
Avg response time has gone down from 50-70ms to 8-15ms. (this baby FLIES)
A couple of issues:
Other issues:
Using autocomplete for a while makes the ec2 come to a halt.. update: seems to be related to calling the fallback
sort results by class sizes
gave up on caching - instead just make a local cash, simply a hash of different "class list" ... it cuts down the time spent in ActiceRecord from ~15ms to 0. However it was already fast, and the difference would most likely go unnoticed by anyone not coding this.... haha
anyways, i went to scheedule to check out their autocomplete and something -
if you type in "cs" you get a dropdown of "cs" and "cse"
play withit yourself to see what i mean http://illinois.scheedule.com/scheduler
ANYWAYS, I think it'd be neat if we can implement that - I think it would make autocomplete noticeable better