perf: Add compilation timing and --skip-network-checks flag#2442
Closed
github-actions[bot] wants to merge 1 commit intomainfrom
Closed
perf: Add compilation timing and --skip-network-checks flag#2442github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
Add --verbose timing information and --skip-network-checks flag to improve compilation performance by avoiding slow network operations. Changes: - Added timing output in --verbose mode for parsing and compilation steps - Added --skip-network-checks flag to skip Docker image validation and GitHub API checks - Implemented skipNetworkChecks field in Compiler struct with setter method - Updated validation.go to respect skipNetworkChecks flag for: - Docker container image validation (validateContainerImages) - GitHub repository features check (checkRepositoryHasDiscussions, checkRepositoryHasIssues) Performance Impact: - Enables users to identify slow compilation steps with --verbose timing - --skip-network-checks provides faster local development iteration - Particularly beneficial on slow network connections or when offline Addresses maintainer feedback: https://github.com/githubnext/gh-aw/discussions/2191#discussioncomment-12035736
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Performance Optimization: Compilation Timing and Network Check Control
Goal and Rationale
Addresses maintainer feedback from discussion comment requesting:
--verbosemode to identify slow compilation stepsThese changes enable faster local development iteration and help developers understand where compilation time is spent.
Approach
1. Added
--verboseTiming Information2. Added
--skip-network-checksFlagdocker pulloperations)skipNetworkChecksfield inCompilerstructImplementation
Modified Files:
cmd/gh-aw/main.go: Added--skip-network-checksflag to compile commandpkg/cli/compile_command.go: Added timing instrumentation andSkipNetworkChecksconfigpkg/workflow/compiler.go: AddedskipNetworkChecksfield and setter methodpkg/workflow/validation.go: Updated validation functions to respect flagKey Changes:
Impact Measurement
Timing Information (--verbose)
Example output:
Network Check Performance
Baseline (with network checks):
Optimized (--skip-network-checks):
Example Usage
Trade-offs
Complexity:
Validation Coverage:
Maintainability:
--strict,--validate, etc.Validation
✅ All unit tests pass (8.8s)
✅ Code formatted with gofmt
✅ No linting errors
✅ Successfully compiled all workflows
✅ Timing output verified in verbose mode
✅ Network checks properly skipped with flag
Reproducibility
To reproduce timing measurements:
Future Work
Additional performance optimizations identified:
Result
Developers can now:
--verbosetiming information--skip-network-checksflagThis directly addresses the maintainer's feedback and provides the tools needed to diagnose and optimize compilation performance on different systems.