Remix.run Logo
bastawhiz 3 days ago

Tl;dr

Use an experimental (as in, 60% of ECMA tests passing, "currently no good I/O or Node compat") AOT compiler for JS. You remove the cold start by removing the runtime, at the cost of maybe your JavaScript working and not having a garbage collector.

jfengel 3 days ago | parent [-]

It might be reasonable to go without a garbage collector if your whole lifetime is so short. GC by decapitation. Kinda clever.

But other than that it's impossible to assess performance with such a tiny toy.

hvb2 3 days ago | parent | next [-]

> It might be reasonable to go without a garbage collector if your whole lifetime is so short.

That isn't how lambda works. A single lambda instance can run for 10s of minutes handling thousands or requests. So not cleaning up memory sounds like a problem to me since you're billed by the GB/second

bastawhiz 3 days ago | parent | prev [-]

If you throw away your memory on every request, every request is a cold start. You've reduced your one-time startup cost but now you pay that reduced cost on every request.