|
On Feb 17, 2025, at 11:29 AM, Nathan Andelin <nandelin@xxxxxxxxx> wrote:
If you look at the RPG code for YAJLINTO you will see that it repeatedly
calls the YAJL_OBJ_FIND() and YAJL_GET_STRING() procedures, so I would
predict that YAJLINTO performs slower. As Brad mentioned, you could test
this pretty easily.
I also wrote a JSON parser in RPG and tested performance against YAJL. I
discovered that the YAJL_BUF_PARSE() procedure performed more efficiently
than the one I wrote in RPG, which created an index in memory to the name
and value nodes and object nodes in a JSON document. However calls to
YAJL_ARRAY_LOOP() and YAJL_OBJ_LOOP() and YAJL_GET_STRING() and
YAJL_GET_NUMBER() were much less efficient than the equivalent procedures I
wrote in my parser, so that my parser ended up performing about twice as
efficiently as YAJL.
On Mon, Feb 17, 2025 at 6:12 AM Brad Stone <bvstone@xxxxxxxxx> wrote:
YAJL is quite fast. I wrote my own parsing for JSON a while back (as a fun--
little refresher course in tree processing and recursion) and it was in
RPG. It was nowhere near as fast as YAJL.
Should be easy to put together a test for YAJL vs YAJLINTO.
On Mon, Feb 17, 2025 at 2:31 AM Suren K <suren7437@xxxxxxxxx> wrote:
Hi All,but I
I’m curious to know if there are any performance differences between
YAJLINTO and YAJL procedures when parsing JSON field by field.
I understand that parsing field by field requires more coding effort,
wanted to check if there are notable performance variations between thefield
two. In DATA-INTO, JSON is parsed once from top to bottom, with each
being populated into the data structure during parsing itself.all
However, in the case of YAJL procedures, if we use yajl_object_find to
locate a field positioned as the 10th field in the JSON, does it parse
10 fields to retrieve its value? If this assumption is correct, YAJLINTO--
might offer better performance compared to YAJL procedures.
Would love to hear your thoughts or suggestions on this.
Regards,
Suren
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.