This hard limit on memory by Chrome and other browsers is done for a reason. It is to stop malicious web pages from over consuming your computers memory, which could be utilised as a malicious attack on your system. So this limit on memory is just a fact of life we have to deal with, even if we are writing SPAs that work with large amounts of data, something many enterprise applications wish to do.
Some users like working with much larger sets of data beyond the limits of ‘snap’. It’s normal for business users to be working through one million or more rows, even dragging columns around to group on the fly. If all the data was in the browser then ag-Grid grouping and aggregation would work, but when the data doesn’t fit in the browser, something else needs to be done…
Old School Pagination
One obvious way to deal with managing data is to use pagination, to bring back data one page at a time from the server. This will work, but I don’t want the end users having to hit ‘next’ multiple times to get to the data that they want. Also it doesn’t easily work with grouping. I wanted something more modern…
‘Facebook Like’ Infinite Scrolling
The next step was for infinite scrolling, where rows are only loaded as the user scrolls down, similar to the famous Facebook feed, the more you scroll the more gets loaded. This technique works with loading rows in a grid, but is only much use to the user if the data they want is towards the top of the list. What we really want is a way to allow the user to group the data on the fly, as grouped data can be navigated more easily, while still allowing the user to lazy load the data as they scroll down…
Bringing Something New
And that is the basis of the new ‘Enterprise Row Model’ in ag-Grid. It allows the user to dynamically group big data. The user is given the interface to navigate what it believes is a very large set of data loaded into the browser using infinite scrolling. As the user scrolls down, more rows are loaded seamlessly. The user can then use the grid UI to group and aggregate the data which the grid appears to all do in browser memory. The grid sends the group information to the server and then reads back the top level groups first for display in the grid. As the user opens a group, the children of the group are lazy loaded. All of these loads (both group and child levels) are done using infinite scrolling so each individual level of the group tree can be incredibly large.
You Did What?
What Does It Mean?
SPAs are all the rage, and big data is also all the rage, so crossing these two has got to be a rage waiting to happen? Well ag-Grid is ready. Now that the tool exists, I’m excited to see what applications ag-Grid users come up with.
The latest update of the grid is out now.
Learn more about Version 18 of ag-Grid.