mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Whenever you're looking at a stack trace generated by the command-line tool, you see tons and tons of useless stack frames for withValue, enterJob, and/or capture. Each of these function calls has its own try-finally block, which is probably the real reason this pattern is slow, though the excess of unnecessary stack frames is subjectively gross as well. Initial build times for the `meteor create --full` app on my machine are about 4.4 seconds with Meteor 1.8, and just 2.8 seconds after this change, which is a nice 36% improvement. Rebuild times are not noticeably different, however. Looking to the future, flattening this function call pyramid should make it easier to introduce non-Fiber-based async/await into the buildmessage system, so that we can start properly propagating promises up the stack.