Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
|
Generally the trade off with ArkType is that initialization/schema creation includes a lot of optimization work that is relatively expensive. Once you're validating, it's extremely cheap and has great built-in error messages. If initialization speed a bottleneck for your overall performance, I would recommend lazily loading arktype if possible or using a validator like Valibot which has very cheap initialization at the cost of some validation speed + error message clarity. This is certainly something I'm interested in looking into in optimizing further via precompilation and potentially eventually releasing something akin to @zod/mini that would be optimized for this scenario out of the box, but if the current trade offs are poorly suited to your needs I might go with another validator for now. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My nodejs server is quite thirsty on ram.
We are looking into it. It seems arktype is shooting up the memory.
Has memory impact been analyzed for arktype and creating schemas?
Beta Was this translation helpful? Give feedback.
All reactions