Improve actor startup time and memory usage #26
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per actor memory usage ~ 267kb to start with debug stripped; I'm not sure how much this can be brought down, but doing less in the startup scripts should help. A test quickjs with all intrinsics enabled comes in to around 60kb, so we're adding around 207kb; probably too much.
Startup time is about 2.3ms. Ideally this would be sub 1 ms, or even faster.
What needs to happen here for lower memory:
docs need to come off of being on objects. Documentation must be a sidecar; it's not good to have each actor holding it, and makes no sense. One doc set per system.
much less needs to happen in base.cm. We monkey patch a lot; they should instead be modules you can pull in, so actors can only get what they need. The thinnest actors can be 50kb, perhaps.
We can even go in and carve out functions in quickjs. For example, remove some of the math functions; these should be in the misty style anyway.
And then finally, move some of our own functions into C, so they're a mere function pointer. This will probably be the biggest win.
Ultimately, 1 C function is about 100 bytes in JS