I was using angular-ui-grid (http://ui-grid.info/) to display tabular data. On the whole, it was quite slow and so we decided to use ag-grid (https://www.ag-grid.com/). This was much more performant and better to deal with for regular-sized data-sets.
However, now we are working with some tabular data of the size of 100 cols x 10,000 rows (~1M cells) and the grid seems quite slow in performance.
I was wondering if anyone had used hypergrid (https://fin-hypergrid.github.io/core/2.0.2/) -- it seems to 'solve' the issue of large cols x large rows and in their demo it seems much faster (almost by an order of magnitude) on large data sets.
How does hypergrid compare to ag-grid or react-virtualized in performance on large data sizes?
I haven't tried any of those example libraries you mentioned, but perhaps I could explain why
fin-hypergrid
stands out the most. My opinion is primarily based on my JavaScript knowledge and how this kind of stuff works in the back.I should probably start with
react-virtualized
andag-grid
:react-virtualized
andag-grid
are their algorithms of applying these changes in the smoothest possible manner.ag-grid
, from what I can see, is the one that suffers the most from this issue as you could actually see some elements that haven't finished rendering yet and experience severe lag when you scroll too fast.react-virtualized
on the other hand does a splendid job implementing its algorithm in the smoothest possible manner. This might be the best library available in the DOM manipulation category though it still suffers from the problem of manipulating the DOM too fast which creates lag, though this is only seen when large chunks of data are involved.Here are the reasons why
fin-hypergrid
excels:fin-hypergrid
is it doesn't perform DOM manipulation at all so you are already saved from the problem caused by adding and removing things too fast since it uses<canvas>
fin-hypergrid
also displays only data that the user sees and dynamically removes things that aren't visible. It also adds in advance to achieve a smooth scroll feeling, so no still-rendering items are shown.fin-hypergrid
also does a really great job on their scrolling algorithm to attain the smoothest possible manner, so there is no jitter or lag.Now that doesn't mean that
hypergrid
is all good, it has some disadvantages too:fin-hypergrid
is made with HTML5 Canvas, styling it will become a real pain as it doesn't accept CSS. You would need to style it manually.<select>
, radio buttons, checkboxes, etc. would be a real pain to implement. If you are trying to implement something like this then proceed with caution.Now in conclusion, I would probably suggest using
react-virtualized
instead since it offers the smoothest scroll, abovefin-hypergrid
. If you are willing to disregard the downsides offin-hypergrid
, thenfin-hypergrid
is the best option.UPDATED:
Since we discussed JS / CSS, canvas implementations of these tables. I should have mentioned the last possible contender though this one is not primarily a js table library but a framework in which
Google Sheets
might have been used it is called d3.js.d3.js
has the speed and power of canvas and at the same time retains HTML structure, this means that it is possible to style it with CSS!d3.js
The only downsides of
d3.js
in this discussion is that:d3.js
.Google Sheets
that is. But they do not share code.d3.js
is just very hard to learn, though there are lots of stuff out there that helps us learn this faster but not that fast.If you wanted speed of Canvas with CSS styling capabalities then
d3.js
is the key the problem is learning it.