Uh oh!
There was an error while loading. Please reload this page.
Cache fetched apps in update check - #7264
Conversation
nickvergessen
commented
Nov 23, 2017
Actually it should be cached already? server/lib/private/App/AppStore/Fetcher/Fetcher.php Lines 143 to 153 in 2eb2b6e |
nickvergessen
commented
Nov 23, 2017
Ah reading helps... |
nickvergessen
commented
Nov 23, 2017
Static fun |
MorrisJobke
commented
Nov 23, 2017
And I have no idea what this is :/ |
MorrisJobke
commented
Nov 23, 2017
Ah - because it is cached and not cleared between those jobs :/ |
Codecov Report
@@ Coverage Diff @@## master #7264 +/- ##
============================================
+ Coverage 50.85% 50.88% +0.02% - Complexity 24551 24552 +1
============================================
Files 1585 1585 Lines 93833 93791 -42 Branches 1354 1354 ============================================
+ Hits 47719 47725 +6 + Misses 46114 46066 -48
|
MorrisJobke
commented
Nov 24, 2017
Okay ... I needed to take a bigger reordering of how it works. basically the second commit in here brings the DI version to all places where the Installer is used. And the third commit replaced the static calls to @nickvergessen@rullzer@LukasReschke Please review |
dbbd514 to
f0b70e7Comparef0b70e7 to
f9f4981Compareblizzz
commented
Nov 24, 2017
Several tests are failing, but on first sight they seem unrelated… but those happen not on master. |
f9f4981 to
bc8b02bCompareMorrisJobke
commented
Nov 25, 2017
It was related. I forgot to mock the call in the tests, so it asked for actual updates in the appstore. 🙈 |
The code tried to find the apps with updates and thus was called for every available app. This caused to get the full appstore content as often as apps are available. The appstore request itself was cached nevertheless in an appdata dir, but with an object storage this is still a lot of round trips to read this cached result. Thus the instantiated list is now cached in a static variable (because it's a static method call). Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
bc8b02b to
df61d43Compare| $apps = $appFetcher->get(); | ||
| if ($this->apps === null) { | ||
| $apps = $this->appFetcher->get(); |
Followup to #7264 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Followup to #7264 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
The code tried to find the apps with updates and thus was called for every available app. This caused to get the full appstore content as often as apps are available. The appstore request itself was cached nevertheless in an appdata dir, but with an object storage this is still a lot of round trips to read this cached result. Thus the instantiated list is now cached in a static variable (because it's a static method call).
Fixes#7235
Diff of the before and after code base: https://blackfire.io/profiles/compare/0b59e81d-4ea4-4a22-ba14-640cf091d487/graph