The magic of using bin_size in contexts.

Imagine a world that when you need to know the existence of a file you have to read all it's content.
Or a little less tragic version... you just have to check the size of a file in filesystem.

As of v13.0 you will always read the full contents of a file and if bin_size is needed - the bytes are counted.

Imagine a eCommerce category with a 50 products per page.
This means that 50 images with resolution of 1920x1920 will be read from disk - only to indicate that product has a image!
And if so, link to a image with a 512x512 will be linked into template instead.
A good quality 1920 image can be up to a 1MB.
So server will read about 50MB worth of data - manipulates it by encoding it to a base64 content and eventually does nothing but indicates that a product has a image... sweet, IOPS well spent!

We made a solution for that problem.
You can download and enjoy it from odoo apps store.
BTW, it's FREE!

 Download now!

Be sure to subscribe Odoo performance blog post notification list.
You wont receive any other newsletter from this list!

FOMO

Fear of missing out for all new blog posts?

The magic of using bin_size in contexts.
Alvar Vilu
22 September, 2020
Share this post
Archive
Sign in to leave a comment
View caching
What is the fastest way to execute code?