camptocamp/odoo-cloud-platform

s3 bucket download performance / direct download

Closed this issue · 6 comments

Hi,

So the current download of the S3 files is quite slow as to consider switching back to PVC.

However as the most of the time the content is used to display in the client browser it seems quite logical to just serve a signed url to the storage directly instead of proxying the download via the odoo instance?

Is any work is going on in that direction?

IIRC that's how IT Projects' ir_attachment_s3 module works: https://github.com/itpp-labs/misc-addons/tree/14.0/ir_attachment_s3

What we encountered most were issue when having to load lots of small files.
Which is why we configured the files such as avatars and thumbnails to be stored in database.
https://github.com/camptocamp/odoo-cloud-platform/blob/13.0/base_attachment_object_storage/README.rst#configuration

We didn't experience much issue with proxied downloads.
Thus we don't have any ongoing dev on this, but that's a good idea.

Beside you might be hitting #318 can you specify which version are you using?

Also, where/when are you experiencing this slowness?

In v12 there was a perf bug that has been fixed which caused a slow call to check if the bucket exists on every call .

FTR I'm solving the same issue on storage_backend_s3 here OCA/storage#155

@simahawk regarding this fix #262, I believe the improvement could go also to future versions, isn't it? Should we make port forwards?

@simahawk regarding this fix #262, I believe the improvement could go also to future versions, isn't it? Should we make port forwards?

Yes, but I'd prefer a solution like OCA/storage#155 w/out keeping buckets in memory. I'm open for suggestions (and reviews) 😉

Thanks @simahawk . To be honest I don't have the knowladge to undertand the difference in deep. I get the idea of the to approaches but not sure I can give any suggestion :|