Skip to content

Conversation

@Altahrim
Copy link
Collaborator

@Altahrim Altahrim commented Sep 9, 2025

Maintain two lists (one for return, the other for new SharedMount) to avoid array_merge in loop.

It can use a lot of CPU time:
image

@Altahrim Altahrim added this to the Nextcloud 33 milestone Sep 9, 2025
@Altahrim Altahrim self-assigned this Sep 9, 2025
@Altahrim Altahrim added 2. developing Work in progress php Pull requests that update Php code performance 🚀 labels Sep 9, 2025
@Altahrim Altahrim marked this pull request as ready for review September 9, 2025 09:22
@Altahrim Altahrim requested a review from a team as a code owner September 9, 2025 09:22
@Altahrim Altahrim requested review from CarlSchwan, leftybournes and yemkareems and removed request for a team September 9, 2025 09:22
@Altahrim Altahrim added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 9, 2025
@Altahrim Altahrim requested a review from icewind1991 September 9, 2025 09:23
@Altahrim
Copy link
Collaborator Author

Altahrim commented Sep 9, 2025

/backport to stable32

Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

🙏

Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

I approve to put out the fire, but I think we should hunt for a prettier solution.

Also, I think the call to array_filter can be removed as I do not see where a falsy value could find its place in $mounts?
Can $event->getAdditionalMounts() return contain null values?

@Altahrim Altahrim merged commit 49a0259 into master Sep 9, 2025
202 checks passed
@Altahrim Altahrim deleted the feat/avoid_array_merge branch September 9, 2025 14:33
@AndyScherzinger
Copy link
Member

I approve to put out the fire, but I think we should hunt for a prettier solution.

Better approach sounds fine, and merging for now so a RC2 deployment wouldn't "unpatch" a RC1+patch instance is the way to go. 👍

@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Oct 2, 2025
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 performance 🚀 php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants