mirror of https://github.com/sbt/sbt.git
The old implementation of checkBuildSources can easily take 20ms to run when called in MainLoop.processCommand. It is rarely faster than 4-5ms. To reduce this overhead, I stopped using the checkBuildSources task in processCommand. Instead, I manually cache the build source hashes in a global state variable and add a file monitor that invalidate the entire set of source hashes if any changes are detected. This could probably be more efficient, but I figure that build sources change infrequently enough that it's fine to just invalidate the entire list of source hashes. Because the CheckBuildSources instance is already watching the meta build, I reworked Continuous to use that FileTreeRepository for the build sources if it is available. Bonus: fixes https://github.com/sbt/sbt/issues/5482 |
||
|---|---|---|
| .. | ||
| main | ||
| test | ||