Skip to content

Skip compilation when there's no code changes #296

@amomchilov

Description

@amomchilov

Hey there,

It looks like the plugin does a full rebuild on every command, even when no code has changed. E.g. on the sample project, running swift package benchmark baseline list takes ~30 seconds, even on a repeated invocation.

$ time swift package benchmark baseline list
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.66s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.12s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.12s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.11s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.12s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.12s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkBoilerplateGenerator' complete! (0.12s)
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build of product 'BenchmarkTool' complete! (1.83s)
Building benchmark targets in release mode for benchmark run...
Building Samples
Building Miscellaneous
Building Minimal
Building MemoryTwo
Building MemoryOne
Building Foundation-Benchmark
Building External-Benchmarks
Build complete!
swift package benchmark baseline list  45.83s user 4.07s system 160% cpu 31.024 total

I'd be happy to contribute to fixing this, if you could point me in the right directiont ot start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions