NeXTs / Clusterize.js

Tiny vanilla JS plugin to display large data sets easily
https://clusterize.js.org
MIT License
7.22k stars 414 forks source link

.filter() function and draw callback to save memory #172

Open JYone3A opened 4 years ago

JYone3A commented 4 years ago

We want to show a list of lots of records and want to be able to filter them. That is why we need to keep the original array of the records (with the raw data) besides the array of HTML strings we provide to clusterize. When filtering, we use the raw data to find out what records should be shown, select those entries from the HTML strings array and send it to clusterize .update()

So basically, we need to versions of our data.

If we had two additional functionalities in clusterize I think we could make that more efficient:

I could try to implement some code, but I wanted to make sure that there are no better ways to save memory, and maybe get some directions where to start.