You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added tool support for running snapshotted Dart scripts. (#1820)
Since tools are run so often, it makes sense to use snapshots to run them, so this makes it so that Dartdoc creates a snapshot automatically of a tool the first time it is run, and then uses that snapshot from then on.
See the README.md for the new instructions, but basically, it creates a snapshot in a tempdir the first time the tool is run, using the first time arguments as training arguments for the compiler. The second time and beyond, it is run using the snapshot. This results in about a 20-100x speedup in startup time for the tool invocations. If you'd rather build and use your own snapshots, it does recognize the .snapshot suffix, and will just use that one instead of generating its own.
In addition, I added the ability to run a "setup" command before the first time a tool runs. This would allow generation of script code, or fetching one-time information needed for the tool to run.
I also added some more tests for things that weren't broken, but also weren't tested, and converted the tool_runner test to get its information from parsing a YAML block instead of setting up the map programmatically (more code coverage that way, and I can test the snapshotted executables that way).
0 commit comments