Remove minification from translations to reduce build time by 1.5mins #7552
Merged
bramkragten merged 1 commit intohome-assistant:devfrom Oct 30, 2020
Merged
Remove minification from translations to reduce build time by 1.5mins #7552bramkragten merged 1 commit intohome-assistant:devfrom
bramkragten merged 1 commit intohome-assistant:devfrom
Conversation
bramkragten
reviewed
Oct 30, 2020
…/develop startup time
05b4e86 to
406e153
Compare
Contributor
Author
|
@bramkragten done |
Contributor
|
Thank you! 🎉 |
Contributor
|
THANK YOU @rob-mccann!!! This is one of those "unsung hero" improvements that never make it to the blog but quietly lead to more features because of how much it improves development flow. Great job. |
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposed change
I noticed it took a little while in the
build-flattened-translationsgulp task. I profiled the task vianode --inspectand saw time spent in minification. Given the translations are already pure json files on a single line, I wondered if the minification was having any impact. I ran an MD5 hash over thebuild-translationsdirectory before and after commenting the line out and it gave the same hashes.Removing the line took this task down from 1.2 minutes to a couple of seconds on my Macbook pro 15. I removed the
build-translationsdirectory between runs.Before:

After:

Type of change
Checklist