Skip to content

Only construct two rules providers in textChanges#19502

Merged
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:memoize-textChanges-providers
Oct 26, 2017
Merged

Only construct two rules providers in textChanges#19502
weswigham merged 1 commit into
microsoft:masterfrom
weswigham:memoize-textChanges-providers

Conversation

@weswigham
Copy link
Copy Markdown
Member

We constructed a new formatting rule provider for each test, however we only ever used two different sets of formatting rules. This memoizes these two rulesets as two providers to avoid the large overhead of reinitializing a rule map for each test. The brings the textChanges test runtime from 2.7s to 0.5s on my machine.

@weswigham weswigham merged commit 6f2d047 into microsoft:master Oct 26, 2017
@weswigham weswigham deleted the memoize-textChanges-providers branch October 26, 2017 22:46
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants