You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I use the media library and have several instances of media collections using <x-media-library-collection ... /> on my page.
When checking loading times and database queries with Debugbar, I see for every media item (not collection, but items in the collection) two identical database queries select * from media where uuid = '...' limit 1
So, if there are 10 media items (i.e. images) on the page, 20 database queries are generated.
Is there something I can do against?
I'm already eager-loading the media relation, but this seems to have a different source. (In fact, I see that it is coming from HasUUID concern, but not sure how to avoid it).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I use the media library and have several instances of media collections using
<x-media-library-collection ... />
on my page.When checking loading times and database queries with Debugbar, I see for every media item (not collection, but items in the collection) two identical database queries
select * from media where uuid = '...' limit 1
So, if there are 10 media items (i.e. images) on the page, 20 database queries are generated.
Is there something I can do against?
I'm already eager-loading the media relation, but this seems to have a different source. (In fact, I see that it is coming from HasUUID concern, but not sure how to avoid it).
Thanks for help.
Beta Was this translation helpful? Give feedback.
All reactions