XML parsing speed on Windows



i’m working as a developer on a cross-platform commercial project that licenses JUCE. by and large, it has been a joy to use.

one odd thing i’ve run into: we’re using the XML parsing classes heavily when saving and loading data, and there is a tremendous (20x or more) speed difference between windows and mac builds. the saved data sometimes comprises many thousands of XML elements, so the slowness on windows really affects usability.

i’m just wondering if this is a known issue, or makes any sense to anyone. if not, i’ll look harder at the other parts of our code, but so far the profiling tests i’ve done point pretty firmly at the JUCE XML classes… and there’s not much else going on there.

any thoughts?

thanks in advance for your help, and for creating such a handy library!


How odd - I guess it must be something in the string-handling that’s behaving differently, though I can’t think offhand what it would be.

Have you tested them both in release builds? I think in the debug build there are some assertion checks done in the string-handling that will slow things down quite a lot. Maybe on one platform you’re running in debug mode?

Or maybe your xml contains a lot of numeric conversions? I suppose string-to-value functions will differ across platforms. Would be intrigued to hear if you find any more clues!


thanks jules!

i am certainly seeing the issue with release builds.

thanks for the hints, i will try and do some deeper profiling and come back with more data…