3 ms·
Great tip for running the JIT AOT, for anyone interested Microsoft calls this "ReadyToRun" compilation [1]. [1] https://docs.microsoft.com/en-us/dotnet/core/de
by moonchrome 5y ago
Great tip for running the JIT AOT, for anyone interested Microsoft calls this "ReadyToRun" compilation [1].
[1] https://docs.microsoft.com/en-us/dotnet/core/deploying/ready-to-run https://docs.microsoft.com/en-us/dotnet/core/deploying/ready...
I wonder did you test if the increased size results in an actual win for the startup time ?
- jabart 5y agoAfter like 256mb it is less of an impact when using readytorun. Some of the lambdas I have are webhooks so latency isn't as important and when it's user facing 512mb seems to be a sweet spot.
- Shadonototra 5y agoand then you need to upgrade the plan because it is disk/memory hungry and doesn't fit within the 128mb plan, so you'll pay 4x more already just use GO and be faster while saving money at the same time
- moonchrome 5y agoLike someone else said lambdas are priced by memory * execution time - if you cut execution time by 1/2 by doubling the memory and using AOT - you got faster lambdas for free (even if it's not as high as 1/2 you'll probably still not be paying x2).
- gokhan 5y agoThe test code is quite small and might not benefit from R2R that much, libs it relies on are already jitted. Ditching Newtonsoft would affect response time though.
- jabart 5y agoI have similar code where it takes some JSON input, and sends it off to SQS with a small bit of formatting. It impacts cold starts even for these smaller functions.