derbyjs / racer

Realtime model synchronization engine for Node.js
1.18k stars 117 forks source link

Add support for "smart updates" of filters. Add smart update of unload event. #242

Open cjblomqvist opened 8 years ago

cjblomqvist commented 8 years ago

Assume the following scenario: 1) You have a lot of docs of collection1 loaded on page 1 2) You go to page where you setup a filter based upon collection1

Due to the unload delay in Racer and how filters work (basically, rerun everything on every little event), you'll end up with perf problems if you have the above scenario. Specifically, we had a simple scenario where we'd have a significant amount of docs (100-1000) unloading, which caused a lot of reruns of the ids fn. This caused the browser to hang.