I am working on an MVC project where I use jqGrid for ASP.NET MVC. However I am told by that the pure-jquery-client-side version (jqGrid) is better in performance. Is this true? To me they both seem to be doing the same stuff, just that the code is in different places- all the bulk work is still done using ajax. any advise would be appreciated.
EDIT- most places I use the grid has less than a 100 rows,page size 30,about 10-12 columns, mostly strings and dates. Only one page I use a grid with 500 rows but that will be used rarely.
I don't think that you should rewrite your existing code, but I can agree that in case of usage less then 1000 rows of data the usage of
loadonce: true
is real alternative.The design of jqGrid is oriented on server side sorting, paging and filtering/searching. So most users who start to use jqGrid in version less then 3.7 have already good implementation of backend. SQL Server with native code should be sure more quickly as JavaScript code were originally designed as interpreter language. On the other side current versions of web browsers contain quickly JavaScript engine. Every new version improve more and more performance of JavaScript.
It could be important for the user the total time of the paring, sorting or filtering operation. It includes the round trip time to the web server. One can better do exact measure in productive environment to compare performance of local grids with grids with pure remote
datatype
("json" or "xml" without usage ofloadonce
). The rough rule which I use myself is:loadonce: true
and so client side paging, sorting and filtering of dataYour environment (network, Round trip time to the server and so on) could be other. So the edge when you should better user client side holding of data and when server side holding could be other. Nevertheless the usage of
loadonce: true
could be really very effective in the practice.I personally don't use commertal version of jqGrid which you referenced. So I have to write backend side myself. In case of usage of
loadonce: true
the server code is very simple. It's easy to debug and to maintain.