Conversation
…ent with changed data types.
…ces-after-migration
fix bug for Media Picker is slow when you have a large number of images at the root folder umbraco#12364
|
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:
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 🤖 🙂 |
|
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 |
|
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. 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. |
|
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 |
|
create new pr #20202 |
Prerequisites
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.