-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Cache result of check upgrade #18945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache result of check upgrade #18945
Conversation
where \OCP\Util::needUpgrade() is called we can call as well self::checkUpgrade and use the cached result In line 877 the call way unnecessary anyway because of the first part of the if statement
|
interesting idea. @VicDeo @icewind1991 opinions? |
|
It is pretty much the same what @LukasReschke has done in #18914 |
|
Wouldn't it be easier to cache at |
|
A new inspection was created. |
|
Yes, you are right, thats even better. I've changed it. |
|
👍 |
|
@karlitschek there is no milestone. 8.2 or 9? |
|
Who is allowed to set the milestone? |
|
@DeepDiver1975 @PVince81 what do you guys think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkUpgrade would display an upgrade page, might be better to call needUpgrade() instead in most cases instead of the other way around ?
Actually checkUpgrade should be called only once to display the page if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkUpgrade has the $showTemplate switch
Just tried to be consequent in the file and not mix needUpgrade() and checkUpgrade()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I misread the code in checkUpgrade, should be safe.
|
👍 |
|
@individual-it You have push access to this repo - right? Please push the branch with all your changes in here - then the CI system can catch up. THX |
|
created a new PR #19355 |
instead of calling
\OCP\Util::needUpgrade()again and again, save the result inself::$needUpgradeand return that value when askedI have done some performance tests. Running 4 user sessions, every uploading 10 folders with 10 small files (4byte) in it. After the upload the test runs PROFIND and downloads all the files again.
Here is the code of the test: https://github.com/individual-it/owncloud-performance-test
It depends on https://github.com/owncloud/pyocclient/
I have compared (means of 4 runs):