[arch-commits] Commit in attica/repos/extra-x86_64 (3 files)
Antonio Rojas
arojas at gemini.archlinux.org
Fri Oct 1 18:47:40 UTC 2021
Date: Friday, October 1, 2021 @ 18:47:40
Author: arojas
Revision: 425004
archrelease: copy trunk to extra-x86_64
Added:
attica/repos/extra-x86_64/PKGBUILD
(from rev 425003, attica/trunk/PKGBUILD)
attica/repos/extra-x86_64/fix-OSC-traffic.patch
(from rev 425003, attica/trunk/fix-OSC-traffic.patch)
Deleted:
attica/repos/extra-x86_64/PKGBUILD
-----------------------+
PKGBUILD | 64 +++++++++++++++++++++++++--------------------
fix-OSC-traffic.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+), 29 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-10-01 18:47:30 UTC (rev 425003)
+++ PKGBUILD 2021-10-01 18:47:40 UTC (rev 425004)
@@ -1,29 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Maintainer: Antonio Rojas <arojas at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-
-pkgname=attica
-pkgver=5.86.0
-pkgrel=1
-arch=(x86_64)
-pkgdesc='Qt library that implements the Open Collaboration Services API'
-url='https://community.kde.org/Frameworks'
-license=(LGPL)
-depends=(qt5-base)
-makedepends=(extra-cmake-modules doxygen qt5-tools qt5-doc)
-groups=(kf5)
-source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz{,.sig})
-sha256sums=('992ffe3743588b81a63dcb3886d406f63800423bd442e3b99058bfc80f0e467f'
- 'SKIP')
-validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure at kde.org>
-
-build() {
- cmake -B build -S $pkgname-$pkgver \
- -DBUILD_TESTING=OFF \
- -DBUILD_QCH=ON
- cmake --build build
-}
-
-package() {
- DESTDIR="$pkgdir" cmake --install build
-}
Copied: attica/repos/extra-x86_64/PKGBUILD (from rev 425003, attica/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-10-01 18:47:40 UTC (rev 425004)
@@ -0,0 +1,35 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=attica
+pkgver=5.86.0
+pkgrel=2
+arch=(x86_64)
+pkgdesc='Qt library that implements the Open Collaboration Services API'
+url='https://community.kde.org/Frameworks'
+license=(LGPL)
+depends=(qt5-base)
+makedepends=(extra-cmake-modules doxygen qt5-tools qt5-doc)
+groups=(kf5)
+source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz{,.sig}
+ fix-OSC-traffic.patch)
+sha256sums=('992ffe3743588b81a63dcb3886d406f63800423bd442e3b99058bfc80f0e467f'
+ 'SKIP'
+ 'bc0302ed8b507bf52638d18dd8570aa2aa61457210cd960ca8c08d819a423f02')
+validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure at kde.org>
+
+prepare() {
+ patch -d $pkgname-$pkgver -p1 < fix-OSC-traffic.patch # Fix excessive OSC traffic
+}
+
+build() {
+ cmake -B build -S $pkgname-$pkgver \
+ -DBUILD_TESTING=OFF \
+ -DBUILD_QCH=ON
+ cmake --build build
+}
+
+package() {
+ DESTDIR="$pkgdir" cmake --install build
+}
Copied: attica/repos/extra-x86_64/fix-OSC-traffic.patch (from rev 425003, attica/trunk/fix-OSC-traffic.patch)
===================================================================
--- fix-OSC-traffic.patch (rev 0)
+++ fix-OSC-traffic.patch 2021-10-01 18:47:40 UTC (rev 425004)
@@ -0,0 +1,67 @@
+commit 7c38c8cf28a4d0d667e23ddfaaf38a955d65bf3e
+Author: Aleix Pol <aleixpol at 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;
+ }
+
More information about the arch-commits
mailing list