Open assemblethis opened 4 years ago
My previous comparison between RegularFind and LiveFind doesn't hold up now that I've taken a second look at it. I was not waiting for the promise to resolve for the time calculation for RegularFind so the above results are incorrect.
A second look makes LiveFind look very performant compared to RegularFind. I'll continue to look closer at the results and update this issue when I next have a chance.
I'm trying to establish how useful LiveFind is and what it contributes to the pouch-vue plugin.
I've been comparing the use of pouchdb-live-find vs pouchdb-find to update the selector results when a new event is emitted by the changes feed.
When you get to larger pouch databases I find that just calling pouchdb-find vs using pouchdb-live-find is faster.
These tests were just comparing the 'ADD' action when a new doc comes in on the changes feed, not the 'UPDATE' action or 'DELETE' action. RegularFind is if the pouchdb is queried using a new find request and LiveFind is the sophisticated array manipulation of the old find request to include the new doc that pouchdb-live-find does.
Rough and preliminary results using Chrome 75:
I'll look into this a little closer and come up with a PR that removes the dependency on pouchdb-live-find and includes the logic to just do a new find query when new data comes in on the changes feed.