Skip to content

perf: reuse known instantiated storages in SharedMounts - #61519

Open
salmart-dev wants to merge 1 commit into
masterfrom
fix/cache-shared-mount-storages
Open

perf: reuse known instantiated storages in SharedMounts#61519
salmart-dev wants to merge 1 commit into
masterfrom
fix/cache-shared-mount-storages

Conversation

@salmart-dev

@salmart-dev salmart-dev commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Avoids querying over and over the DB to initiate a SharedMount for a storage that is already known. This stops N+1 issues when using instanceOfStorage on SharedStorage for the same root storage through different SharedStorage instances.

TODO

  • Double-check that getting the storage ID in the way I did is okay and behaves as expected with multiple wrappers
  • Add steps to reproduce and description of what the root/source path handling does

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@salmart-dev salmart-dev added this to the Nextcloud 35 milestone Jun 22, 2026
@salmart-dev salmart-dev self-assigned this Jun 22, 2026
Base automatically changed from fix/noserverget-shares to master June 23, 2026 08:39
@salmart-dev
salmart-dev force-pushed the fix/cache-shared-mount-storages branch from 1ed5568 to be730ae Compare June 23, 2026 12:00
@salmart-dev salmart-dev changed the title perf: reuse known storages in shares perf: reuse known instantiated storages in SharedMounts Jun 23, 2026
@salmart-dev
salmart-dev force-pushed the fix/cache-shared-mount-storages branch from be730ae to c528b72 Compare June 24, 2026 12:40
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
@salmart-dev
salmart-dev force-pushed the fix/cache-shared-mount-storages branch from c528b72 to f302d2e Compare July 3, 2026 10:18
@salmart-dev
salmart-dev marked this pull request as ready for review July 3, 2026 10:18
@salmart-dev
salmart-dev requested a review from a team as a code owner July 3, 2026 10:18
@salmart-dev
salmart-dev requested review from a team, Altahrim, ArtificialOwl, CarlSchwan, artonge, icewind1991 and leftybournes and removed request for a team, Altahrim, ArtificialOwl and leftybournes July 3, 2026 10:18
@salmart-dev salmart-dev added the 3. to review Waiting for reviews label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants