We’re excited to announce a new article that will help you improve the performance of your sites that use data.
https://support.wix.com/en/article/corvid-improving-performance-in-sites-with-data
As always, your feedback is greatly appreciated.
We’re excited to announce a new article that will help you improve the performance of your sites that use data.
https://support.wix.com/en/article/corvid-improving-performance-in-sites-with-data
As always, your feedback is greatly appreciated.
Thanks for this info, it is appreciated. Now the feedback: is there a limit to how many array objects you can feed in one go using bulkInsert()? If we build an array of object to insert with 2 million entries, things would probably choke. What do we do? How do we limit? We´re just having a discussion on this forum about the 1 minute token issued when doing db actions. And then there is the the 14 secs timeout for Promises. Some of us are now going beyond of what you might have envisioned, so we would greatly appreciate an answer to these questions.
Hey Giri,
As far as the bulk operations go, they are limited to 1000 items and 0.5MB in payload.
@sam-wix Now that´s an answer. Thanks. Any tips on how to calculate to 1000 (only joking)? No, how do we calculate the 0.5 MB? Could you, for instance, give us an idea how much space every data type occupies. Plus a bit of overhead for arrays? Or do you convert everything to strings?
Sorry to be such a bother, but I am going to need this info soon, am working towards it and would like to know before I begin. Need to bulkInsert 365 arrays entries max, but I do not know how to calc the payload.
@giri-zano what you could do is simply try calling the operation, if you get an error, just retry with two requests half of the payload each.
Another option is to estimate the size:
const textEncoder = new TextEncoder();
console.log(textEncoder.encode(JSON.stringify([{ test: 10 }])).length);
Add another 100 or so for the invisible part of the payload. But this won’t work reliably in client code as not all browsers support it.
@giedrius-grazevicius Thank you for that, a progressive backoff. Browser doesn´t matter it´s all backend code anyway.
On a larger note, I am having trouble wrapping my head around the (usually undocumented) limitations. Let me explain. We have, as far as I know:
Is there more? Could you, if you have some time to spare, publish an article about all limitations when working with backend functions and db´s?
Any info on this will be highly appreciated, because I am sure that all the things I run into, other people will, eventually, do to. Just a matter of time.