Closed timotheegoguely closed 1 year ago
Yeah this behavior is not desirable. It ideally would:
Is it something that can be improved easily or does it need a lot of rework?
Actually I'm double checking, that is what the media library is suppose to be doing already. So I need some more information to look into this further:
media_folder
or are they in a collection specific folder?media_folder
Actually I'm double checking, that is what the media library is suppose to be doing already. So I need some more information to look into this further:
- Are you storing your images at the root
media_folder
or are they in a collection specific folder?- Which page are you loading when you see all the requests? The main collection view or the editor itself?
At some point, media is loaded and saved in the entry state (mediaPaths entry property / state.mediaLibrary) which I already noticed when implementing folder support. I didn't manage to find out when that happens though
A list of them is loaded into the entry but its only the meta data. The actual file is not loaded until its needed for display.
I've been trying without success to replicate this. I have tested this using both Gitlab and Github backends. I've uploaded hundreds of images to them and the only ones I see load on editor load are the ones selected in image or file widgets. The rest do no load till the media library modal is opened, even then they are only loaded when you scroll to them.
@timotheegoguely, I have a hunch where this might be occurring. But I need you to help me confirm a couple of things.
@KaneFreeman For me, it seems to be caused by retrieveLocalBackup....
After a lot of testing, I was able to narrow down some issues that are causing these images to load. As it is today, the card/grid view in the collections page tries to load the image for the first image field it finds. It then displays that image when you view the card/grid view.
However, it was doing a couple of things that are the likely culprits of your performance issues:
So if you had 500 entries each with a unique image, then 500 images were loaded every time you went to that collection. If you then quickly clicked into an entry it would still be loading those images and would cause the editor to sit on the loading screen until all the images had been loaded in.
The next release has some changes that will drastically help reduce this:
Since the table view is the default, this means:
This fix also completes #36
Fantastic! Looking forward to testing the next release!
Hi,
I'm working on a Hugo project with a lot of media (~2000 files, mostly images and some PDFs) stored in
/static/media
and I'm using GitLab as a git provider and Static CMSv2.2.0
.When I want to display a single post from a big posts collection (~500 items), why does the app need to fetch all the repo images before being able to display the editor UI? Wouldn't there be a way to avoid all these requests and improve app performance?
As it is, it becomes almost impossible for content editors to use Static CMS to update their website content because of the slowness of the app (each page sometimes takes more than 1 minute to load).