strapi
strapi copied to clipboard
Improve media upload performance
👋🏻 What does it do?
In the upload service, when uploading image, thumbnail, and responsive formats one by one, upload them all together.
As an example, when using cloudinary: 7s before 3s now.
❓ Why is it needed?
Especially, when using nonlocal upload providers, uploading images (and not even heavy ones) was slow.
🧪 How to test it?
Upload any image in this branch and master and compare timings.
Codecov Report
Merging #13995 (a013c92) into fix/cloudinary-provider-missing-catch (aca2faf) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## fix/cloudinary-provider-missing-catch #13995 +/- ##
======================================================================
Coverage 55.26% 55.27%
======================================================================
Files 1253 1253
Lines 31593 31599 +6
Branches 5706 5706
======================================================================
+ Hits 17460 17466 +6
Misses 12319 12319
Partials 1814 1814
Flag | Coverage Δ | |
---|---|---|
front | 57.96% <ø> (ø) |
|
unit | 48.69% <100.00%> (+0.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
packages/core/upload/server/services/upload.js | 28.79% <100.00%> (+2.30%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us.
@MarionLemaire Yes ! that's the expected behavior.
I have to note something that I did not specify clearly. The performance improvement should be only for images. I am surprised it's faster with things other than images.