Tree view performance issues when binary fields are too big

I create a binary field for storing an image.
the picture can be more that 5 mb.

when I render it in the tree view it takes a lot of time … even if I set size to 40x40.

I assume that the view load the entire image and then it resize it .
I’m ready to create a second field to store the image as 40x40, and fill it once uploaded the big one.

but I wold like to know if there is any better way to manage it.


Hi Matteo! Nice to meet you again :wink:

The way you suggest is the right way of doing it: create a new Function Binary field that returns the same image but resized.

Dear Albert,
it’s very nice to talk with you !! We are still maintaining the koo client !!!
Thanks for your reply, but I do not understand when the function field is computed.
If it’s computed when we browse the data, it will be very resource consuming for the server. if it is cached in some way may be is not a problem… for this I was proposing to feed the field in the write function. Any hint is very appreciated !!


Function fields are re-computed for each request so it is better to keep them fast.
So in your case, it is probably better to store a resized version of the image.

1 Like