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

Performance improvements for documentation generation #1837

Merged
merged 7 commits into from
Nov 15, 2018

Conversation

jcollins-g
Copy link
Contributor

Precache local documentation only when there's a chance it is necessary, don't block on I/O for deleting temporary directories, and eliminate inefficient uses of string splitting and joining. Combined impact approximately 5% performance improvement with asserts enabled for Flutter.

@googlebot googlebot added the cla: yes Google CLA check succeeded. label Nov 14, 2018
final macroRegExp = new RegExp(r'<dartdoc-html>([a-f0-9]+)</dartdoc-html>');
return rawDocs.replaceAllMapped(macroRegExp, (match) {

return rawDocs.replaceAllMapped(htmlInjectRegExp, (match) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks: much better name.

r'[ ]*{@inject-html\s*}([\s\S]+?){@end-inject-html}[ ]*\n?',
multiLine: true);
return rawDocs.replaceAllMapped(templateRegExp, (match) {
return rawDocs.replaceAllMapped(htmlRegExp, (match) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh. I guess I haven't been paying too much attention to renaming things I cut and paste...

@jcollins-g jcollins-g merged commit 47dba01 into master Nov 15, 2018
@jcollins-g jcollins-g deleted the macro-perf-boost branch November 15, 2018 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants