-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Split file contents in the lines only once #157
Labels
Comments
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 5, 2020
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 5, 2020
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 5, 2020
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 5, 2020
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 10, 2020
Co-Authored-By: Veronika Romashkina <vrom911@gmail.com>
popzxc
added a commit
to popzxc/hintman
that referenced
this issue
Jan 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is inefficient that
ModifiedFile
content is split into lines by each lint separately, since the expensive operation is repeated many times while it can be done only once.One more thing is that
List
may not be the most efficient structure to store lines, since some lints (e.g.NoNewlineAtFileEnd
) don't need to process all the lines, but instead need one concrete line (e.g. last). ThusVector
may be a better choice.As a conclusion, the proposed solution is to add a field like
mfLines
to theModifiedFile
type, and perform splitting once inHint.hs
(but the raw content should be available as well, no need to removemfContent
).For details see a discussion at #156.
The text was updated successfully, but these errors were encountered: