sam-goodwin / punchcard

Type-safe AWS infrastructure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

closure serialization

sam-goodwin opened this issue · comments

commented

Right now we use webpack to do basic tree-shaking. I think pulumi's approach would be more efficient - they built their own closure serialization logic that will rip out only bits of the closure actually used at runtime (or AFAIK).

https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/runtime/closure/createClosure.ts#L217

commented

Closure serialization may no longer be necessary because the new Build and Run monads allow us to prune out expensive code. This is much simpler than serializing out a closure's code and data.

See: #53