• James D. Lin's avatar
    Make `ProjectFileInvalidator.findInvalidated` able to use the async `FileStat.stat` (#42028) · 83704b1d
    James D. Lin authored
    Empirical measurements indicate on the network file system we use
    internally, using `FileStat.stat` on thousands of files is much
    faster than using `FileStat.statSync`. (It can be slower for files
    on a local SSD, however.)
    
    Add a flag to `ProjectFileInvalidator.findInvalidated` to let it
    use `FileStat.stat` instead of `FileStat.statSync` when scanning for
    modified files.  This can be enabled by overriding `HotRunnerConfig`.
    
    I considered creating a separate, asynchronous version of
    `findInvalidated`, but that led to more code duplication than I
    liked, and it would be harder to avoid drift between the versions.
    83704b1d
run_hot.dart 39.4 KB