-
Notifications
You must be signed in to change notification settings - Fork 374
chore: Improve l10n build performance #6737
Conversation
a-b-r-o-w-n
left a comment
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.
@beyackle can you also take a look at this?
| // TODO: It would be nice to use the regular expression matching. | ||
| // It would be nice to ignore the lib folders rather than listing them one at a time. | ||
| // However, as of 4/2021 it doesn't seem to work. | ||
| // We have the added complexity that packages/lib contains folders we DO want to process. |
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.
Yeah. Easiest thing to do is probably just remove the lib directory and move the contents up a directory.
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.
Agree. Didn't want to create any major restructure so close to release.
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.
I definitely agree here, too. It keeps tripping me up that we have regular non-compiled code in a lib folder (and then each package in there has compiled stuff in its own lib folder).
| // TODO: It would be nice to use the regular expression matching. | ||
| // It would be nice to ignore the lib folders rather than listing them one at a time. | ||
| // However, as of 4/2021 it doesn't seem to work. | ||
| // We have the added complexity that packages/lib contains folders we DO want to process. |
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.
I definitely agree here, too. It keeps tripping me up that we have regular non-compiled code in a lib folder (and then each package in there has compiled stuff in its own lib folder).
Description
The l10n:babel extracts strings from the source code.
It is currently including lib folders which contain built JS with the same formatMessage calls as the TS source.
This creates a lot of extra files in the l10ntemp folder which later l10n commands have to process - slowing the build.
This PR excludes those folders using the wildcard search pattern in the ignore section of the babel config file.
I tried to use the regex format, but it doesn't seem to work and babel won't output information about matches.
Task Item
#minor
Screenshots
Old yarn l10n build time (on my dev machine): 115 s
New yarn l10n build time (on my dev machine): 95 s
Savings: 20 s