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

chore: speedup replace-env-vars.sh #1146

Merged

Conversation

erijohnt
Copy link
Contributor

@erijohnt erijohnt commented May 27, 2023

The previous implementation of this script uses find to enumerate all files under the app directory, then reads all of those files in a single while loop to apply sed. This is extremely slow with ~80k files during build time. We don't need to read all these files like that; we can use grep to search for files that we actually need to update and then parallelize the sed command to do it.

I ran shellcheck against the script to make sure I didn't introduce any obvious new footguns and made sure docker-compose -f docker-compose.yml up --build still built the image and ran without issues.

@vercel
Copy link

vercel bot commented May 27, 2023

@erijohnt is attempting to deploy a commit to the Plane Team on Vercel.

A member of the Team first needs to authorize it.

@pablohashescobar
Copy link
Collaborator

Thank you so much, @erijohnt, for your valuable contribution. We truly appreciate your effort. I'm pleased to inform you that we will be merging this pull request.

@pablohashescobar pablohashescobar merged commit 1afb3ba into makeplane:develop May 28, 2023
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.

2 participants