1. Paweł Kasperek
  2. PowerBuilder
  3. Tuesday, 8 October 2024 12:10 PM UTC

Hi,

I've got a newbie question about the performance and memory consumption in the below scenarios:

- I've got a large JSON file and I need to load it to PB. Which PB type is the best for performance: structure, datawindow (datastore) or nonvisual object?

- The same question for memory consumption.

Maybe, there exists a documentation about the best practice of using PB object for better performance and low memory consumption ?

Regards

Paweł 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Tuesday, 8 October 2024 12:49 PM UTC
  2. PowerBuilder
  3. # 1

More information, pl.

1.  Which version of PB you use, or plan to use.
2.  Size of JSON file and approx. no of rows, if imported in a datawindow.
3.  Is your application 32 bit or 64 bit.
4.  What you plan to do with JSON data.

Processing more than 5000 rows using a datawindow is slower (IMO).  

Happiness Always
BKR Sivaprakash

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 8 October 2024 19:53 PM UTC
Hi BKR;

If the JSON file is of a *simple* nature (ie: just straight rows / columns) then the DataWindow object is your best fried here. :-)

If the JSON is of a *complex* nature, then the only avenue would be to use the JSONParser object class. While you can load the data into it from a TXT file, It is of course slower, more memory consumptive and requires coding on your part.

Regards .. Chris
  1. Helpful 1
  1. Paweł Kasperek
  2. Wednesday, 9 October 2024 12:19 PM UTC
Thank you for your answer. I checked and DW is a good choice for JSON files smaller than 2-3 MB. I wrote our parse to Nonvisualobject using reflection of class definition class. And it works.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 9 October 2024 14:25 PM UTC
Thank you for that great feedback! :-)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.