Admin note: Moved this discussion to its own thread
Out of interest why did this limitation exist (4mb) if media objects side step it?
Is there some downside to doing everything as media objects?
Admin note: Moved this discussion to its own thread
Out of interest why did this limitation exist (4mb) if media objects side step it?
Is there some downside to doing everything as media objects?
Yes. Anvil takes care of encoding and decoding the other types for you. For Media objects, that becomes your responsibility. So you have to create, test, debug, and maintain the code that handles those Media objects.
Thanks for responding.
If that is the case, why would Anvil need to create this limitation? What about larger objects makes the handling of the encoding/decoding something that anvil.works does not want to handle? I would have thought it was a resource thing but if I’m going to have to encode/decode it then resource utilisation seems similar…
It depends on the network protocols under the covers. I suspect that there are two transmission protocols at work: one for small, self-contained packets, and one for long, binary streams. The former works great for nearly everything – except blobs (Media objects) – and does the to/from Python encoding/decoding for you. The latter allows truly large, binary payloads – perfect for Media objects – but has a lot more overhead, to accommodate the things that can go wrong with a piece-at-a-time transmission.
For performance reasons, you wouldn’t want to use a high-overhead protocol for small data packets (most ordinary server calls) when it’s avoidable.
Thanks that makes a lot of sense.