Fix build time issue and two other tiny cleanups #138
Merged
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.
Hi @pbakaus, this fixes the build time issue. :) I was doing something very stupid and expensive when generating the nav menu (notice the removal of the
O(n)
check). The whole site (all locales) builds in about five minutes on my machine now, and I'm pretty happy with that time.Next week I'll look into some additional caching or optimizations that can be done on the Grow side, but I think a five minute build for 3000 Markdown files is hopefully reasonable enough for now! [Still would like to make it faster though. ;)]
This PR also contains two minor other things
doc.locale.is_rtl
instead of checking a hardcodedar
locale.grow deploy
since it's not used in this workflow, nor does that command actually work without a destination anyway.If you could double check the nav menu to ensure it's still being generated properly, that'd be great. I did a cursory check and I think it looks good.
Cheers!