Skip to content

[Transforms] Performance improvements in the comment emitter.#8906

Merged
rbuckton merged 15 commits into
transformsfrom
transforms-commentsPerf
Jun 1, 2016
Merged

[Transforms] Performance improvements in the comment emitter.#8906
rbuckton merged 15 commits into
transformsfrom
transforms-commentsPerf

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

Simplifies the comment emitter and reduces allocations for Comment Ranges. Also allows the runtests-file jake task to run in parallel.

@rbuckton rbuckton added the Domain: API: Transforms Relates to the public transform API label May 31, 2016
@rbuckton
Copy link
Copy Markdown
Contributor Author

CC: @vladima, @yuit, @sandersn, @mhegazy

Comment thread src/compiler/comments.ts
else {
disabled = true;
emitCallback(node);
disabled = false;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe it should save previous value of disabled and restore it later instead of unconditionally set it to false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no need, the first branch handles that case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

got it

Comment thread src/compiler/scanner.ts Outdated
@@ -594,10 +594,15 @@ namespace ts {
* and the next token are returned.
* If true, comments occurring between the given position and the next line break are returned.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should these comment get updated?

@rbuckton rbuckton merged commit 0af375e into transforms Jun 1, 2016
@yuit
Copy link
Copy Markdown
Contributor

yuit commented Jun 1, 2016

👍

@rbuckton rbuckton deleted the transforms-commentsPerf branch June 1, 2016 22:15
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Domain: API: Transforms Relates to the public transform API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants