Optimization Development Pointers
#1
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
Reply
#2
(2024-05-15, 20:33)druscoe Wrote: I would like to apply some patches to improve the performance of library scans, especially over NFS.
Hello and thanks for delving into the code.
The best first step is to create a PR against the Master branch. This allows the developers to more easily understand what you are trying to achieve and discuss it with you.
Let us know if you have any questions.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#3
(2024-05-15, 20:33)druscoe Wrote: Is there any tests for this area?

If there are tests, they will probably be in /xbmc/xbmc/test.  I'm not sure if there is anything regarding XML parsing.
Reply
#4
Some thoughts:

1  If you haven't, create a build environment per platform README https://github.com/xbmc/xbmc/tree/master/docs

2 Also look at the code guidelines and contributing docs, same place.

3. Split code into logical commits. Remember reviewers are all time-limited volunteers; try to make their job easier.

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Optimization Development Pointers0