-
Notifications
You must be signed in to change notification settings - Fork 43
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
Parser.Parse takes around 18s to parse the 58K file #22
Comments
I can not read the file from the archive. It looks like it has binary data. |
Oh, I get it. The whole point is that the file is binary and its parsing error occurs. Time is wasted on getting an error message in this method, which makes numerous extremely inefficient string replacement calls. |
My explanation was incorrect. The point is not even in allocations, but in the fact that the iterator for each character in the source line called |
Parser.Parse takes around 18s to parse the 58K file from the attached archive. You can run the following code to reproduce it (the path variable should contain the path to the extracted file):
Found via SharpFuzz.
The text was updated successfully, but these errors were encountered: