Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Manager is very slow with a large quantity of images #75

Open
alexandru-burca opened this issue Sep 30, 2020 · 5 comments
Open

Media Manager is very slow with a large quantity of images #75

alexandru-burca opened this issue Sep 30, 2020 · 5 comments

Comments

@alexandru-burca
Copy link

Hello,

My project have a folder with around of 400 000 images in other 20 folder filled with images. When I try to open the "Media Manager" it takes around of 5 minutes to load the page [and my mac goes crazy ].

I saw that the tool supports lazy loading but even with lazy loading 400 000 seems to be too much for it.

Is there any setting that I am missing? Please advice?

Thank you very much for this tool.

@artgris
Copy link
Owner

artgris commented Oct 1, 2020

Hi, In my last release, you can add a twig_extension to handle image preview:

https://github.com/artgris/FileManagerBundle/blob/master/Resources/doc/book/1-basic-configuration.md#twig_extension-to-apply-a-twig-filter-or-a-twig-function-to-preview-images

and resize (for example) image preview

@artgris
Copy link
Owner

artgris commented Oct 1, 2020

or if you don't need a preview, override my template and delete the column.

@alexandru-burca
Copy link
Author

alexandru-burca commented Oct 1, 2020

Thank you @artgris but even with a filter that crops my images to 20px20 it takes around of 2min and more than 526 alocated memory to load the images.

And even after I override the template "preview.html.twig" the loading time remain the same.

Maybe the best solution here will be to add pagination and load only 20 or a user specified number of images per page.
What do you think about that, is this a feature that can be easily integrated?

Thank you

@bozhidargyurov
Copy link

bozhidargyurov commented Oct 25, 2020

I'm hitting similar issues even with a smaller amount of images. Maybe the best approach is to add a pagination. And a configuration option to disable crawling the subdirectories of the main folder (which is used from the configuration), so that you can use a folder only on one level.

@Martin1982
Copy link
Contributor

Martin1982 commented Feb 9, 2022

This might be improved if #98 gets approved. No silver bullet yet though.

show_file_count: false will hide the number of files per directory, but also disables the calculation which seemed to be quite costly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants