Commit a1d6dc7
authored
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).1 parent 19fb1a9 commit a1d6dc7
File tree
59 files changed
+1154
-152
lines changed- bin
- lib
- src
- testing
- test_package_docs_dev
- ex
- HtmlInjection
- ToolUser
- test_package_docs
- ex
- HtmlInjection
- ToolUser
- test_package
- bin
- lib
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+1154
-152
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
| 266 | + | |
265 | 267 | | |
| 268 | + | |
266 | 269 | | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
272 | 276 | | |
273 | 277 | | |
274 | 278 | | |
275 | | - | |
276 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
277 | 297 | | |
278 | 298 | | |
279 | 299 | | |
280 | 300 | | |
281 | 301 | | |
282 | 302 | | |
283 | | - | |
284 | | - | |
| 303 | + | |
| 304 | + | |
285 | 305 | | |
286 | 306 | | |
287 | 307 | | |
| |||
301 | 321 | | |
302 | 322 | | |
303 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
304 | 345 | | |
305 | 346 | | |
306 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
0 commit comments