XML parsing of the Statefile is slow and grow in O(n^2)
Hello, dear developers.
With paraview 5.3, the loading time of a state file explodes with the number of filters in the pipeline.
A simple way to test this:
- Create 100+ sphere sources in a state file (I strongly recommend using a macro). In my tests, all spheres were visible.
- Save the state.
- Load the state.
My tests: 100 spheres - 7 mb - 15 sec.
200 spheres - 15 mb - 60 sec.
300 spheres - 20 mb - 120 sec.
It seems to follow an order of growth of O(n^2). I found that surprising since there aren't any link between the spheres and would expect a linear growth.
I saw in the code that we are using a 3 years old version of pugixml (1.4) while they are at 1.8. Maybe an upgrade would speed up the process and hopefully make it O(n). I tried swapping with 1.8, but the interface change considerably between 1.4 and 1.8.
Maybe another XML parsing library would scale up in a better way. Finally, I don't know if it would really be faster, but maybe the statefile should be saved in JSON ?
Thanks in advance, Jonathan.