Author Topic: Efficiency of load/render data by array and json  (Read 3365 times)

noctrona

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
Efficiency of load/render data by array and json
« on: February 28, 2014, 07:57:06 am »
Hi,

We will use this plugin in a new project. And we want to choose a way to CRUD data from database between array and json.

For the moment, I queried records from our database and handle them as json format on my page.(I get result from background and handle them as json format on my page)

So I want to ask you if we have lots of records need to display or CRUD which way has a higher efficiency? So far as I know, the may be several hundred. May be more in the future.



Thank you!

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Efficiency of load/render data by array and json
« Reply #1 on: February 28, 2014, 09:09:55 am »
Generally arrays are faster than JSON, but that makes little difference in the context of pqGrid because most of its time is spent in rendering the view.

pqGrid can handle hundreds of thousands of records for view or CRUD for both JSON and array.

It's better to go with JSON considering it makes for better readability and easiness in testing of code.

« Last Edit: February 28, 2014, 09:55:04 am by paramquery »

noctrona

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 82
    • View Profile
Re: Efficiency of load/render data by array and json
« Reply #2 on: February 28, 2014, 11:56:49 am »
Generally arrays are faster than JSON, but that makes little difference in the context of pqGrid because most of its time is spent in rendering the view.

pqGrid can handle hundreds of thousands of records for view or CRUD for both JSON and array.

It's better to go with JSON considering it makes for better readability and easiness in testing of code.


Thanks for your suggestion.