Skip to content

feat: keep a classname mapping instead of always storing the full name for shares - #62904

Merged
CarlSchwan merged 2 commits into
masterfrom
unified-sharing-classmap
Aug 8, 2026
Merged

feat: keep a classname mapping instead of always storing the full name for shares#62904
CarlSchwan merged 2 commits into
masterfrom
unified-sharing-classmap

Conversation

@icewind1991

@icewind1991 icewind1991 commented Aug 4, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

Instead of storing the full class name every time, keep a table that maps them to integers, so we only need to store an int.

Saves 60 bytes for each sharing source, recipient, property and permission

Extracted from #62708

Checklist

AI (if applicable)

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

@icewind1991 icewind1991 added this to the Nextcloud 35 milestone Aug 4, 2026
@icewind1991
icewind1991 requested a review from a team as a code owner August 4, 2026 19:42
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Aug 4, 2026
@icewind1991
icewind1991 requested review from Altahrim, leftybournes, nfebe and salmart-dev and removed request for a team August 4, 2026 19:42
@icewind1991 icewind1991 changed the title feat: keep a classname mapping instead of always storing the full name feat: keep a classname mapping instead of always storing the full name for shares Aug 4, 2026
@icewind1991
icewind1991 force-pushed the unified-sharing-classmap branch 2 times, most recently from bf1ca51 to 3b135cf Compare August 4, 2026 23:58
@icewind1991
icewind1991 requested a review from CarlSchwan August 5, 2026 00:04
Comment thread lib/private/Sharing/SharingManager.php
Comment thread lib/private/Server.php

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Comment thread apps/sharing/lib/Migration/Version1000Date20260731171922.php
@icewind1991
icewind1991 force-pushed the unified-sharing-classmap branch 4 times, most recently from 400b31f to a86efd3 Compare August 7, 2026 19:52
@icewind1991

Copy link
Copy Markdown
Member Author

not sure why the test are failing consistently, but only on php 8.3

can't reproduce locally

@icewind1991
icewind1991 force-pushed the unified-sharing-classmap branch from a86efd3 to 85af83f Compare August 7, 2026 20:38
@icewind1991

Copy link
Copy Markdown
Member Author

not sure why the test are failing consistently, but only on php 8.3

can't reproduce locally

was caused by cleanup not flushing cache, not sure why 8.5 didn't hit that though 🙉

@icewind1991
icewind1991 force-pushed the unified-sharing-classmap branch 2 times, most recently from f9907b0 to 2e21b7f Compare August 7, 2026 20:52
Signed-off-by: Robin Appelman <robin@icewind.nl>

# Conflicts:
#	lib/private/Sharing/SharingBackend.php
#	lib/private/Sharing/SharingManager.php
…n existing shares

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991
icewind1991 force-pushed the unified-sharing-classmap branch from 2e21b7f to 4b8139a Compare August 8, 2026 11:06
@CarlSchwan
CarlSchwan enabled auto-merge August 8, 2026 13:03
@CarlSchwan
CarlSchwan merged commit e6833d4 into master Aug 8, 2026
239 of 241 checks passed
@CarlSchwan
CarlSchwan deleted the unified-sharing-classmap branch August 8, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants