diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-12-12 16:52:08 +0200 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2022-12-16 11:42:46 +0200 |
commit | 77a90fdd09ad72f9919900e141cc9bfb8a533a12 (patch) | |
tree | 12c1ab61fdf600d79c00e8e73b5ae9d4357aaa53 /src/libs/installer/metadata.h | |
parent | c02d33db5723b7605dc953de078c26d54f284d5e (diff) |
Metadatajob: optimize checking for repository updates
The Updates.xml files from repositories may contain 'RepositoryUpdate'
elements that list actions for existing or new repositories. We need
to parse these updates and restart the metadata job if necessary.
However this was done by parsing the XML file with the Qt XML modules
QDom* classes, which gets expensive as not all of the files contain
any repository updates. This is the most time consuming step left in
case the cache is fully populated and up-to-date.
Instead attempt to make the process faster by filtering out Updates.xml
files that do not contain the 'RepositoryUpdate' element with a string
search, before properly parsing the files.
Change-Id: I87894fdc51f37095e46415a238c9da99624f4f44
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src/libs/installer/metadata.h')
-rw-r--r-- | src/libs/installer/metadata.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs/installer/metadata.h b/src/libs/installer/metadata.h index af7acf6b9..3063be829 100644 --- a/src/libs/installer/metadata.h +++ b/src/libs/installer/metadata.h @@ -61,6 +61,8 @@ public: void setPersistentRepositoryPath(const QUrl &url); QString persistentRepositoryPath(); + bool containsRepositoryUpdates() const; + private: Repository m_repository; QString m_persistentRepositoryPath; |