[cli] experiment: refactor/optimize mops toolchain bin command#305
[cli] experiment: refactor/optimize mops toolchain bin command#305rvanasa wants to merge 1 commit into
mops toolchain bin command#305Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR makes a few minor code changes as an experiment to speed up
mops toolchain binand (indirectly) other commands by caching config and reducing file system operations / command executions.The performance improvement is very minimal (~0.02 seconds on my machine for the motoko-hamt benchmark), so it's probably better to view this PR as a refactor rather than optimization.
Skipping
ensureToolchainInited()anddownload()results in another ~0.08 seconds of savings, but this appears negligible compared to the overhead of running the Node.js script.