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 optimization for apk packages #1358

Merged
merged 1 commit into from Jul 20, 2017

Conversation

Projects
None yet
2 participants
@jandelgado

jandelgado commented Jun 25, 2017

This patch dramatically improves performance when building larger alpine apk packages.

Performance optimization for apk packages: This patch dramatically im…
…proves

performance when building larger alpine apk packages.

@jordansissel jordansissel merged commit c7393be into jordansissel:master Jul 20, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jordansissel

This comment has been minimized.

Owner

jordansissel commented Jul 20, 2017

I haven't tested, but this change looks fine to me.

For posterity and any curious readers, the reason this improves performance is the previous operation += concatenates two strings and stores the result -- this creates a new string every time, making the previous value something needing to be garbage collected. The << operator appends directly to the string without wasting much memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment