-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize MVC diagnostic listener (#584)
Meant to do this a while ago - stop generating strings for repeated things. We have a finite amount of combinations here, so let's use that to our advantage. Overall, we most often have a pair of one label that doesn't change at all and a second string within a finite set. Because of this, we can cache the tuple or 2 => string conversion and not allocate to gen 0 per step. Since the conversion of source => final string on the second half only happens once, we can also prettify it a bit without paying the cost each time.
- Loading branch information
1 parent
a461068
commit a48fc7a
Showing
1 changed file
with
80 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters