Skip to content
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

performance: increase perfomance when build with -tag release #410

Closed
wants to merge 1 commit into from
Closed

performance: increase perfomance when build with -tag release #410

wants to merge 1 commit into from

Conversation

pnsafonov
Copy link

Conditional compilation to fix #408


func initReleaseOptions() {
CheckChildAlreadyExists = true
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can skip option.go and have this in norelease.go

const CheckChildAlreadyExists = true

and this in release.go

const CheckChildAlreadyExists = false

@wader
Copy link
Owner

wader commented Aug 31, 2022

But did my patch earlier to use a map fix the performance issue? if so i would probably prefer that to keep things simple, generally try to avoid having options if possible

@pnsafonov
Copy link
Author

But did my patch earlier to use a map fix the performance issue? if so i would probably prefer that to keep things simple, generally try to avoid having options if possible

Yes, patch with map fix performance issue. Same performance as conditional compile approach.
Merge request:
#411

@pnsafonov
Copy link
Author

Alternative is used:
#411

@pnsafonov pnsafonov closed this Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase performance
2 participants