-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: significantly increase build speed #114
Conversation
Signed-off-by: Valery Piashchynski <[email protected]>
Signed-off-by: Valery Piashchynski <[email protected]>
Signed-off-by: Valery Piashchynski <[email protected]>
WalkthroughThis update introduces new dependencies in Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Files selected for processing (2)
- builder/templates/templateV2023.go (1 hunks)
- github/pool.go (8 hunks)
Files skipped from review due to trivial changes (1)
- builder/templates/templateV2023.go
Additional comments (Suppressed): 9
github/pool.go (9)
43-49: The buffer size of
queueCh
has been increased from 1 to 100. This change allows more concurrent operations, which can improve performance. However, it also increases memory usage. Ensure that the system has enough memory to handle this increase.
[APPROVE]69-74: The error handling has been improved by introducing the
appendErr
method. This method locks the mutex, appends the error to theerrs
slice, unlocks the mutex, and callswg.Done()
. This is a good practice as it encapsulates the error handling logic and makes the code cleaner.
[APPROVE]79-89: The error handling logic has been replaced with the
appendErr
method. This change makes the code cleaner and more maintainable.
[APPROVE]98-103: The error handling logic has been replaced with the
appendErr
method. This change makes the code cleaner and more maintainable.
[APPROVE]109-114: The error handling logic has been replaced with the
appendErr
method. This change makes the code cleaner and more maintainable.
[APPROVE]128-152: The error handling logic has been replaced with the
appendErr
method. This change makes the code cleaner and more maintainable.
[APPROVE]170-174: The
appendErr
method is a good addition. It encapsulates the error handling logic, making the code cleaner and more maintainable.
[APPROVE]182-188: The
errors
method now returns a copy of theerrs
slice instead of the slice itself. This change ensures thread safety by preventing external modifications to theerrs
slice.
[APPROVE]190-195: The
moduleinfo
method now returns a copy of themodinfo
slice instead of the slice itself. This change ensures thread safety by preventing external modifications to themodinfo
slice.
[APPROVE]
Reason for This PR
Description of Changes
Parallelize network operations as much as possible.
Approx 10x faster builds:
Right - Old, Left - New velox (
go clean -modcache
), first run:18.14s vs 275.06s
3.5s vs 36s
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).CHANGELOG.md
.Summary by CodeRabbit
Release Notes
github.com/roadrunner-server/rpc/v4
andgithub.com/roadrunner-server/config/v4
inbuilder/templates/templateV2023.go
for enhanced functionality and compatibility.github/pool.go
with the introduction of theappendErr
method, providing thread-safe error accumulation.queueCh
channel buffer size ingithub/pool.go
from 1 to 100, allowing for better concurrency and throughput.github/pool.go
by returning copies oferrs
andmodinfo
slices inerrors
andmoduleinfo
methods respectively, preventing potential data races.