Skip to main content

performance of xmltostruct

  • April 17, 2019
  • 4 replies
  • 0 views

Ingo Stiller
Forum|alt.badge.img+3

We do have a REST-interface to a third party application (an archiv-system)
The returned data is in XML format, so I use "xmltostruct" to convert to struct inside UnifAce.
All working well, but ...
But now I got a perforamnce issue 😔
When the server returns ~150k of data, it takes over 5 seconds to convert to structs.

a) is this normal?
b) any other (performant) way to convert XML to structs?

Ingo



4 replies

Knut Dybendahl
Forum|alt.badge.img
  • Participating Frequently
  • April 18, 2019

We do have a REST-interface to a third party application (an archiv-system)
The returned data is in XML format, so I use "xmltostruct" to convert to struct inside UnifAce.
All working well, but ...
But now I got a perforamnce issue 😔
When the server returns ~150k of data, it takes over 5 seconds to convert to structs.

a) is this normal?
b) any other (performant) way to convert XML to structs?

Ingo



Edit...

Me thinks you're being 'greedy'  - 30k records / second - in anyone's book I'd say that'd be fast...  😉

Of course, it depends on the size of the 'record' as well....  I presume you have tried to do an xml load into a table structure to compare the two...  ??

150k - what sort of record structures / nested data are we talking? - one record layout?  1-many?

Knut


Ingo Stiller
Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • April 23, 2019

We do have a REST-interface to a third party application (an archiv-system)
The returned data is in XML format, so I use "xmltostruct" to convert to struct inside UnifAce.
All working well, but ...
But now I got a perforamnce issue 😔
When the server returns ~150k of data, it takes over 5 seconds to convert to structs.

a) is this normal?
b) any other (performant) way to convert XML to structs?

Ingo



Hi Knut

The layout is 1:n:m: ...   🙂

But I encounter the problem also on this XML:
https://www.bzst.de/SharedDocs/GEMFA/GemfaExport_xml.html;jsessionid=9C649CDE50B4118EECEA289FE8220BF2.live6831?nn=33742

Testing on my own PC, the perfomance was quit okay but at customer site, it tooks seconds.
It's very strange

Ingo




Knut Dybendahl
Forum|alt.badge.img
  • Participating Frequently
  • April 23, 2019

We do have a REST-interface to a third party application (an archiv-system)
The returned data is in XML format, so I use "xmltostruct" to convert to struct inside UnifAce.
All working well, but ...
But now I got a perforamnce issue 😔
When the server returns ~150k of data, it takes over 5 seconds to convert to structs.

a) is this normal?
b) any other (performant) way to convert XML to structs?

Ingo



The zip file contained an XML file - some 15mb of data.

XMLTOSTRUCT took less than 4 seconds to convert -

with more than 231,700 tags (one line = one tag)

in the file.  All up, pretty respectable I think...

Knut


Ingo Stiller
Forum|alt.badge.img+3
  • Author
  • Participating Frequently
  • May 13, 2019

We do have a REST-interface to a third party application (an archiv-system)
The returned data is in XML format, so I use "xmltostruct" to convert to struct inside UnifAce.
All working well, but ...
But now I got a perforamnce issue 😔
When the server returns ~150k of data, it takes over 5 seconds to convert to structs.

a) is this normal?
b) any other (performant) way to convert XML to structs?

Ingo



So, I switch over to JSON (as the remote application also support JSON)
And voila, the perfomance is quiet good.

@UnifAce:
What's going on in XMLTOSTRUCT that it is so slow?
Are you try to access -unintentionally -the network?
Mayby for some namespaces?
The time of delay could be a (multiple) timeout on network ...

Ingo