I know that the xml format has been deprecated (although it is still available in 3.7.5). But I am having concerns with this decision. My relatively simple test plugin shows that the transition to json is actually not “free”… quite the contrary.
- the xml version has 469 lines for a total size of 213 398 chars
- the json version has a (mind boggling) 11277 lines!!! for a total size of 341 484 chars which represents a 24x increase in number of lines and 1.6x increase in size
I am not sure this is something that was taken into consideration when taking this decision…
Parsing the json uidesc is more than 100% faster than parsing the xml uidesc.
The size increase is 40% if you don’t embed images. If you embed images into the uidesc the size increase is negligible.
Both of those assertions are not correct in my use case.
I ran some testing on loading/parsing: 19ms to load json. 11ms to load xml (I was doing the loading/parsing 100 times in a loop and taking the average).
My uidesc does not embed any images.
You can see for yourself: this is the zip compressed version of the json version
JambaTestPlugin.uidesc.zip (11.5 KB compressed / 341 KB uncompressed)
The XML version is online jamba/JambaTestPlugin.uidesc at v5.1.5 · pongasoft/jamba · GitHub
It seems intuitive that json parsing would be faster than XML, but reading 341KB instead of 213KB is always gonna take longer…
Did you use a release build for measurement?
I am using VST 3.7.5. Is that what you are asking?
I see similar parsing performance when I build the sources without optimization, but if you turn on optimization then the json parser is much faster.
Ok I see what you are talking about. I will give it a try.