wavegate / resmatch

https://resmatch.vercel.app
0 stars 0 forks source link

Switch crudHandler listAll to AG Grid Infinite Row Model (from client side to server side pagination/sorting/filtering/search) #37

Open wavegate opened 1 week ago

wavegate commented 1 week ago

Currently every page retrieves all data from the server (Select * from table) and returns it the client, and the client handles all sorting, filtering, and searching through AG Grid free version Client Row Model (see row models https://www.ag-grid.com/react-data-grid/row-models/). This works for smaller amounts of data, and the AG Grid can display 100K entries no problem, but the initial load can take longer as the server needs to return more and more data, and may eventually impact frontend memory issues. This isn't currently breaking the application, but this does not scale well. The response time for the application is increasing gradually, as well as the memory load by the application. Over 100 entries are being added to the dataset each day, so over the application cycle, if more and more users join, there could potentially be over 10k entries to load at once.

AG Grid also has an Infinite Row model, which allows sorting/filtering/pagination on the Server Side. This allows us to scale each page to be limited by server-side instead. This would increase load when users filter or search, but would decrease the initial load of getting all the entries. Moving to a server side sorting/filtering/pagination will also allow us to implement these filters in the List View, which currently does not exist, thereby enhancing our mobile view. In addition to sorting/filtering/pagination, the Client Row model has a Quick Search which basically searches through the entire grid, which is super useful, which would need to be replicated in part or in whole on the server side.

Performance-wise, I can't say for sure that this will improve the user experience of the application, as this would require more work done by the server for filtering/sorting/paginating.

wavegate commented 1 week ago

This is on hold as I continue to monitor memory usage and response time