Skip to content
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

Optimization - Implementation of a cache on Snapshot::path() #435

Conversation

ChristopheLarchier
Copy link
Contributor

@ChristopheLarchier ChristopheLarchier commented Dec 16, 2024

Time spent in ComputeFSOperationWorker::inferChangesFromDb for a 30 K items sync.

Without optimization:
2024-12-19 08:47:35:927 [D] (0x16ff9f000) utility.h:199 - Time counter inferChangesFromDb value:0.361502
2024-12-19 08:48:24:968 [D] (0x16ff9f000) utility.h:199 - Time counter inferChangesFromDb value:0.480998
2024-12-19 08:48:36:819 [D] (0x16ff9f000) utility.h:199 - Time counter inferChangesFromDb value:0.368319
2024-12-19 08:49:18:336 [D] (0x16ff9f000) utility.h:199 - Time counter inferChangesFromDb value:0.434929
2024-12-19 08:49:48:648 [D] (0x16ff9f000) utility.h:199 - Time counter inferChangesFromDb value:0.34866
Total: 1.994408

With optimization:
2024-12-19 08:21:38:232 [D] (0x16ff13000) utility.h:199 - Time counter inferChangesFromDb value:0.147962
2024-12-19 08:23:21:881 [D] (0x16fe87000) utility.h:199 - Time counter inferChangesFromDb value:0.1495
2024-12-19 08:24:52:519 [D] (0x1708eb000) utility.h:199 - Time counter inferChangesFromDb value:0.153976
2024-12-19 08:25:03:236 [D] (0x1708eb000) utility.h:199 - Time counter inferChangesFromDb value:0.149765
2024-12-19 08:30:26:941 [D] (0x1708eb000) utility.h:199 - Time counter inferChangesFromDb value:0.145286
Total: 0.746489

=> 63% improvement

@ChristopheLarchier ChristopheLarchier marked this pull request as ready for review December 19, 2024 07:09
@ChristopheLarchier ChristopheLarchier requested a review from a team as a code owner December 19, 2024 07:09
@herve-er
Copy link
Contributor

herve-er commented Dec 19, 2024

I created a Jira card to implement a SnapshotCopy class, preventing unintended change of the snapshot copy that could lead to corruption of the cached path: KDESKTOP-1461.

herve-er
herve-er previously approved these changes Dec 20, 2024
@herve-er herve-er enabled auto-merge (squash) December 20, 2024 10:15
…-Snapshot-path-' of github.com:Infomaniak/desktop-kDrive into KDESKTOP-1447-Optimization-Implementation-of-a-cache-on-Snapshot-path-
ChristopheLarchier and others added 3 commits December 20, 2024 11:56
…-Snapshot-path-' of github.com:Infomaniak/desktop-kDrive into KDESKTOP-1447-Optimization-Implementation-of-a-cache-on-Snapshot-path-
@ChristopheLarchier ChristopheLarchier merged commit 4a21e25 into develop Dec 20, 2024
7 checks passed
@ChristopheLarchier ChristopheLarchier deleted the KDESKTOP-1447-Optimization-Implementation-of-a-cache-on-Snapshot-path- branch December 20, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants