Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
This PR checks if transformers are simply just returning the data they are given and if that's the case bypasses them entirely. This avoids the serialization/deserialization overhead of passing data into and out of the JS isolate, especially for MongoDB which does BSON serialization and deserialization.
I'm also making the BSON internal buffer size configurable with an environment variable so that we can change it to whatever we want as can self-host users. Currently you cannot return more than 17 megabytes of data from a MongoDB query and this limitation is imposed by the BSON library because 16 megabytes is the MongoDB document size limit. Queries could be returning multiple documents so this limit could be quite constricting for no good reason.
Description
This PR checks if transformers are simply just returning the data they are given and if that's the case bypasses them entirely. This avoids the serialization/deserialization overhead of passing data into and out of the JS isolate, especially for MongoDB which does BSON serialization and deserialization.
I'm also making the BSON internal buffer size configurable with an environment variable so that we can change it to whatever we want as can self-host users. Currently you cannot return more than 17 megabytes of data from a MongoDB query and this limitation is imposed by the BSON library because 16 megabytes is the MongoDB document size limit. Queries could be returning multiple documents so this limit could be quite constricting for no good reason.