-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query reg Performance upgradation #262
Comments
As mentioned in #188, the multiplatform way is to use |
I tried but unable to construct Reader Object that needs to be passed for xmlstreaming.newGenericReader, couldn't find any resource/example reg constructing ktXmlReader/xmlstreaming.newGenericReader from String. Is there any example available for reference.
Yes I am enabling isCachingEnabled = true flag while configuring xml serialiser.
|
@LogeswaranRamasamy In the test suite for the core module the xmlutil/core/base/src/commonTest/kotlin/nl/adaptivity/xmlutil/TestKtXmlReader.kt Lines 32 to 39 in f9389da
It is just a function call to the "global" factory property with the string as parameter. And then for deserialization, you pass your own reader rather than having this done for you by the (serialization) format. (See also: https://pdvrieze.github.io/xmlutil/core/nl.adaptivity.xmlutil/-i-xml-streaming/index.html#323393628%2FFunctions%2F132463284). Note that caching is enabled by default but is scoped on the format instance (don't recreate it for each (de)serialization for best speed). |
@pdvrieze I tried it out & could see some noticeable reductions in processing time in my end. Thanks!!! |
Is there any Multiplatform compatible way to Read/Write XML File during Serialization & Deserialization efficiently ?
I tried xml.decodeFromString(string) but it seems to bit slow as it appears to follow DOM approach. Instead I am looking for something similar to StAx parser offering performance as Data I am working on will be pretty huge.
The Data I am working will be available as String, so issues in reading it as multiplatform solution.
The text was updated successfully, but these errors were encountered: