Closed afuetterer closed 3 months ago
Hi @afuetterer
Take a look here https://xsdata.readthedocs.io/en/latest/data_binding/basics/
Context All binding metadata is generated and cached in a XmlContext instance. It's recommended to either reuse the same parser/serializer instance or reuse the context instance.
Thank you.
Are there even more benefits in reusing context AND parser or does that make no difference?
No the only real benefit comes from reusing the context and comes down to the number of your models,
For example the netex suite, it's about ~6k models, on my dev machine it takes 0.65seconds to build the binding metadata for all the models the cache size is almost ~29mb.
Alright, thank you.
Hi, I have a quick question about XML parsing. I want to define a single parser that is reused after parsing each XML string.
The docs say:
See: https://xsdata.readthedocs.io/en/latest/data_binding/xml_parsing/
There is no comment or explanation about these steps. Also the parser is defined twice in this snippet.
Do I need to initialize config and context objects for optimal performance?
Looking forward for any tips and hints.