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

Remove isLastNonWhitespaceCharCloseBrace regex #615

Closed
dsherret opened this issue Apr 28, 2019 · 0 comments
Closed

Remove isLastNonWhitespaceCharCloseBrace regex #615

dsherret opened this issue Apr 28, 2019 · 0 comments

Comments

@dsherret
Copy link
Owner

dsherret commented Apr 28, 2019

The isLastNonWhitespaceCharCloseBrace regex in StatementsStructurePrinter is incredibly slow. When printing this library's declaration file, it spends 9% of its time executing this regex.

Edit: It actually doesn't make sense it's taking so much time... I may be misreading chrome's profiling tools (I'm used to using dotTrace for c#). It still would probably be better to do a non-regex solution for this.

Edit 2: On another run this regex only used 1% of the time. I guess I need to run the profiler multiple times to get a more accurate picture.

dsherret added a commit that referenced this issue May 4, 2019
I didn't test this (famous words), but I assume this should be faster.
@dsherret dsherret closed this as completed May 4, 2019
dsherret added a commit that referenced this issue May 4, 2019
I didn't test this (famous words), but I assume this should be faster.
dsherret added a commit that referenced this issue May 14, 2019
I didn't test this (famous words), but I assume this should be faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant