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

Models with files attached are slow to save vs without files attached #2730

Open
Amnesthesia opened this issue Mar 17, 2024 · 3 comments
Open

Comments

@Amnesthesia
Copy link

Saving a record that has anything attached with Carrierwave takes significantly more time to save than saving records of the same model that don't have anything attached yet

I'm not sure why this is, e.g if Carrierwave is automatically downloading the file and then saving it again

@mshibuya
Copy link
Member

Most possible cause is #2461.
If that's not the case, providing the uploader code will be helpful to track down the cause.

@Amnesthesia
Copy link
Author

@mshibuya With or without head requests, should this really be necessary when saving fields on a record that don't touch the carrierwave field? Why should it need to do any requests at all when the file has not been touched?

@mshibuya
Copy link
Member

CarrierWave doesn't do that, so it's likely that the problem is in your code. That's why I'm requesting you the uploader implementation.

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

No branches or pull requests

2 participants