Uh oh!
There was an error while loading. Please reload this page.
fix(taskprocessing): More caching - #50331
Conversation
59e1551 to
258df9eCompare| ICacheFactory $cacheFactory, | ||
| ) { | ||
| $this->appData = $appDataFactory->get('core'); | ||
| $this->cache = $cacheFactory->createLocal('task_processing::'); |
There was a problem hiding this comment.
distributed cache would be good here too, it falls back to local cache if unavailable
There was a problem hiding this comment.
I believe we can't use distributed cache here because it uses json_encode to serialize the values and that breaks stuff
There was a problem hiding this comment.
apcu will serialize faithfully, afaik
There was a problem hiding this comment.
we can probably handle the json_encode ourselves and pass the validated result only to the cache but feel free to use local only, won't affect it much
There was a problem hiding this comment.
At least the result of getAvailableTaskTypes( should be string-array only? So should be totally fine?
There was a problem hiding this comment.
Small comment regarding local vs distributed cache.
Local cache should typically be better for performance because it has lower latency. The distributed cache leaves the machine, at least for clustered setups with a dedicated Redis node.
There was a problem hiding this comment.
At least the result of getAvailableTaskTypes( should be string-array only?
It's not, sadly
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
marcelklehr
commented
Jan 23, 2025
/backport to stable31 |
marcelklehr
commented
Jan 23, 2025
/backport to stable30 |
marcelklehr
commented
Jan 23, 2025
Cypress failure seems unrelated |
marcelklehr
commented
Jan 24, 2025
Together with nextcloud/app_api#500 this shaves 150ms off getNextScheduledTask on my machine |
0c393bf to
028e6e2Compareoleksandr-nc
commented
Jan 24, 2025
Quite a serious figure, excellent optimization! |
028e6e2 to
fa4bd44Compare…quests Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…well Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Co-authored-by: Julien Veyssier <julien-nc@posteo.net> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
fa4bd44 to
a610002Compare
Summary
Shave off some miliseconds.
Checklist