I would like to apply some patches to improve the performance of library scans, especially over NFS.
I have run a profiler and found a significant proportion of time is spent:
– Parsing XML files.
– Checking for special files (.nomedia, BluRay files, DVD files).
– Converting paths to CURL objects (parsing a path and protocol)
Hacking away at the code I can easily manage a very significant improvement on a library scan duration. Ive seen up to 20% improvement on scans of a Tv Show library. Although, this is obviously hacking on a private branch without worrying about too much about what I am breaking. Now I think I have my ideas solidified I would like to create some actual patches to create a PR and I am looking for advice on how to do this.
The first issue I would like to tackle is the overwhelming duplication of parsing XML data. The repeating parsing is happening in `CAddon::CSettingsData` and `CAddon::CSettingsData::m_addonSettings`.
To tackle this I would like to refactor the utility methods defined in `addons/Addon.cpp`.
Is there any tests for this area? I want to be certain that I am not inadvertently breaking anything related to addons.
And, a general question. What is the best way to go about an optimization patch such that it will get accepted as a PR?
Thanks
Damien