summaryrefslogtreecommitdiff
path: root/kde-frameworks/attica
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /kde-frameworks/attica
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'kde-frameworks/attica')
-rw-r--r--kde-frameworks/attica/Manifest3
-rw-r--r--kde-frameworks/attica/attica-5.86.0-r1.ebuild (renamed from kde-frameworks/attica/attica-5.86.0.ebuild)2
-rw-r--r--kde-frameworks/attica/files/attica-5.86.0-fetch-categories.xml-only-once.patch68
3 files changed, 72 insertions, 1 deletions
diff --git a/kde-frameworks/attica/Manifest b/kde-frameworks/attica/Manifest
index 16dc26784f5f..141fa343dfea 100644
--- a/kde-frameworks/attica/Manifest
+++ b/kde-frameworks/attica/Manifest
@@ -1,5 +1,6 @@
+AUX attica-5.86.0-fetch-categories.xml-only-once.patch 2156 BLAKE2B da3a18472e18e2ac1866242ff89bbdb65a1f207e5630306e45953c9dbe7df9ec8e380bb38fa3ebcb13b6bdf2f36344d54b5576a5431776db54c13191ad795df9 SHA512 40b51d7e1c5f42c2b97bea1c20704c3e740357f094745669a33773b696e309a15c7f21abf4a7a5e61fa87c64e23e70bf4c98fc381ce38ae8045f7d2cead3f506
DIST attica-5.85.0.tar.xz 66672 BLAKE2B 61e3ca48058f615af27fd7ad226c2a3ad6a05ae6edb1e1e59ed4dded937ec24a5115780fe128011bb983d83d3d7e3603a1780a5b15dadbceb95165f05e2fd1e6 SHA512 a6f64c51bd0b6a8eb739db198b6db7f5c91f3276912a0bba8b20bbca526738b6e8baea24e6f4502cd0f96b1fc704f4a61445dde0acd645776052527d376215bc
DIST attica-5.86.0.tar.xz 66608 BLAKE2B 631c6c779a931ad8bd12cc48db707463ffba69b1f7f003c85dd0e619362dcc53e2ee7a31467f60b87380ef8ae5441138b16a88df630789925f3859a2e4881219 SHA512 aff74d1bbde5ad10f007f3f51f7bf0346746fd6fd5ca37745001257a72b04bb02a08bd61f03891edc13fbb11975833d1fa1ced6dcc116f9435a544dc9e6d5d47
EBUILD attica-5.85.0.ebuild 474 BLAKE2B 69014551eac7b2fc88654885770f6a8f8da75610d8cbbee26f3636da90298c89fd90a3b94d53306a3ecc96420db7e1f973c9f374a540bc2badc83e83df11640c SHA512 6fe63eb1f450893872ace7783150df0f63f4dfe16b28154408a3c7eaaed48f2173aa9fd33fb1eb783cc0844acad28362457d7f9c8fb5eb308aacc59d07986d6e
-EBUILD attica-5.86.0.ebuild 477 BLAKE2B a317b99cf0e08a4bd81bbae69d2829f73bd23fcda698c01e96ffc5733eb3d4fef461dc29b05e88503e5fcafe42ad539424d416b0ccce2a1a1f36224c0f582e97 SHA512 ebe9f550ff6bd301ba3ceac3be6bb1ce2394a58b8370d46f68e6a80f3596df309e1ac49c7b5275a5e4ddc62682e285f91215f4635e708abfa61b91920f52c8b1
+EBUILD attica-5.86.0-r1.ebuild 546 BLAKE2B d954004c2a9bb828591c81eaee4e80a035e56937e0b03b1de9423de2ed10f7f238b3289c217febf9af32564da42a1bb5336f94915e553c1f467c2e8050ebb973 SHA512 7364a3b7002eb0bfcf9132165ead7dcafcb55af8827643f693c34f91c18ec67b149a217d42ff8e90692c0759f9e85cb75112661f4488a13c778a49e2fc12da5f
MISC metadata.xml 456 BLAKE2B 4392b1cc6f304778d71236d5eb557dfbbd530143eea5cad9a3c3034e3e8b22c835f6c7f980124a21cefd35a2dd1efd5110adc0a5342170f88dfd7418b12bee99 SHA512 7ba65331cad434e2dceee012a5458d268eb2a04e0f7276b265c15644e6db5209bc7eee7d9695aa0038c435711e0f6f0dc53c7bae9d773b48f01e22a22e4dbb80
diff --git a/kde-frameworks/attica/attica-5.86.0.ebuild b/kde-frameworks/attica/attica-5.86.0-r1.ebuild
index b126db32d6af..d920df50fa1f 100644
--- a/kde-frameworks/attica/attica-5.86.0.ebuild
+++ b/kde-frameworks/attica/attica-5.86.0-r1.ebuild
@@ -16,6 +16,8 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/${P}-fetch-categories.xml-only-once.patch" )
+
src_test() {
# requires network access, bug #661230
local myctestargs=(
diff --git a/kde-frameworks/attica/files/attica-5.86.0-fetch-categories.xml-only-once.patch b/kde-frameworks/attica/files/attica-5.86.0-fetch-categories.xml-only-once.patch
new file mode 100644
index 000000000000..75f7f75b6e91
--- /dev/null
+++ b/kde-frameworks/attica/files/attica-5.86.0-fetch-categories.xml-only-once.patch
@@ -0,0 +1,68 @@
+commit 7c38c8cf28a4d0d667e23ddfaaf38a955d65bf3e
+Author: Aleix Pol <aleixpol@kde.org>
+Date: Wed Sep 22 16:19:39 2021 +0200
+
+ Ensure categories.xml is only fetched once in parallel
+
+ Otherwise we overload the server that is returning them fairly slowly
+ anyway (2 to 3 seconds?). It seems like it serves these sequentially as
+ well, which makes Discover startup stuttery.
+
+diff --git a/src/atticabasejob.cpp b/src/atticabasejob.cpp
+index 99acf4f..e65d556 100644
+--- a/src/atticabasejob.cpp
++++ b/src/atticabasejob.cpp
+@@ -26,6 +26,7 @@ public:
+ PlatformDependent *m_internals;
+ QNetworkReply *m_reply;
+ bool aborted{false};
++ bool started = false;
+
+ Private(PlatformDependent *internals)
+ : m_internals(internals)
+@@ -120,7 +121,10 @@ void BaseJob::dataFinished()
+
+ void BaseJob::start()
+ {
+- QTimer::singleShot(0, this, &BaseJob::doWork);
++ if (!d->started) {
++ d->started = true;
++ QTimer::singleShot(0, this, &BaseJob::doWork);
++ }
+ }
+
+ void BaseJob::doWork()
+diff --git a/src/provider.cpp b/src/provider.cpp
+index 9e4da64..b994ce9 100644
+--- a/src/provider.cpp
++++ b/src/provider.cpp
+@@ -64,6 +64,7 @@
+ #include <QFile>
+ #include <QNetworkAccessManager>
+ #include <QNetworkReply>
++#include <QThreadStorage>
+ #include <QUrlQuery>
+
+ using namespace Attica;
+@@ -1134,8 +1135,18 @@ ListJob<Category> *Provider::requestCategories()
+ return nullptr;
+ }
+
+- QUrl url = createUrl(QLatin1String("content/categories"));
+- ListJob<Category> *job = new ListJob<Category>(d->m_internals, createRequest(url));
++ const QUrl url = createUrl(QLatin1String("content/categories"));
++
++ // Thread-local cache of categories requests. They are fairly slow and block startup
++ static QThreadStorage<QHash<QUrl, ListJob<Category> *>> reqs;
++ ListJob<Category> *job = reqs.localData().value(url);
++ if (!job) {
++ job = new ListJob<Category>(d->m_internals, createRequest(url));
++ QObject::connect(job, &BaseJob::finished, [url] {
++ reqs.localData().remove(url);
++ });
++ reqs.localData().insert(url, job);
++ }
+ return job;
+ }
+
+