Skip to content

V13/fix issue 12364#20153

Closed
landlogicit wants to merge 8 commits intoumbraco:v13/devfrom
landlogicit:v13/fix-issue-12364
Closed

V13/fix issue 12364#20153
landlogicit wants to merge 8 commits intoumbraco:v13/devfrom
landlogicit:v13/fix-issue-12364

Conversation

@landlogicit
Copy link
Contributor

@landlogicit landlogicit commented Sep 16, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes:
#12364 (comment)

Description

I've identified and implemented a solution to address the slowness of the Media Picker when dealing with a large number of images in the root folder. The solution involves to change controller EntityController and modify a method that optimizes the retrieval of media items with pagination.

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

Hi there @landlogicit, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@emmagarland
Copy link
Collaborator

Hi @landlogicit

Thanks for the PR to resolve the issue of slow media pickers with large amounts of images in root. I understand that (as per #12364), it’s persisted up to 13 but resolved in 14, however there is an appetite from HQ to resolve it. So thank you for your efforts here. It would be a long running issue resolution for sure!

I can see there’s some merge conflicts here - one of the core collaborator team will try to resolve and review (presuming @nielslyngsoe doesn't review it first).

Thanks again,

Emma

@AndyButland
Copy link
Contributor

AndyButland commented Sep 19, 2025

I don't think this can be accepted as is I'm afraid @landlogicit. If I understand correctly, this will limit any call to this endpoint to the first 100 items. EntityController isn't tied to being used only for media.

In the 13 backoffice, it looks to be only called by the media picker, but that doesn't mean a package may not be using it. Also, it feels a bit arbitrary to limit to 100 items - likely only to invoke future questions of how to access the 101st.

@nielslyngsoe nielslyngsoe marked this pull request as draft September 19, 2025 12:27
@nielslyngsoe
Copy link
Member

Hi @landlogicit

This solution is what I would consider breaking, limiting a endpoint which previously would output everything to now only output 100. That we cannot do in a minor release.

I would still like to see a non-breaking solution, so if you have a plan on how to make it happen, let us see it. But if that is not possible, I have to be honest and say the only path forward is upgrading to the latest version. Or restructure your media library to avoid this problem.

I will mark this PR as a Draft, and then please mark it for "Ready for review" when you have a non-breaking solution we can review.

Thanks in advance

@landlogicit
Copy link
Contributor Author

create new pr #20202

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.

5 participants