Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Large files eat memory #17

Open
matthewlein opened this issue Jun 25, 2021 · 1 comment
Open

Large files eat memory #17

matthewlein opened this issue Jun 25, 2021 · 1 comment

Comments

@matthewlein
Copy link

After uploading some very large (700mb) videos, I noticed this field was eating 20-30% of my available RAM on show and edit pages. It was also very slow. I edited a local version that removed rendering of the show template, and the RAM use went away.

If I had to guess, I'd say that the show field getting the entire field object is whats causing it.

<%= render 'fields/carrierwave/show', field: field %>

I'd suggest maybe an option to render that field, or look into just passing the filepath if thats all you need. I might look at those options myself but for now my workaround is just referencing a model method that just does field&.url instead, and the form template without the show rendering.

@michelegera
Copy link
Contributor

Hi @matthewlein!

Thanks for flagging that. I think your analysis is right. Would you be able to submit a PR that adds an option to conditionally render the show partial?

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

No branches or pull requests

2 participants