-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Only check for @generated
-like markers in file header
#2654
Conversation
@sanmai-NL that's a brilliant idea for perfs :) Please can you also update the CHANGELOG.md ? |
@nvuillam How to add labels? |
done ^^ |
I examined the docs, and I think they needn't be changed, likewise, I don't consider this change breaking for spec-compliant data. Before the marker was sought anywhere in the source file, now it is only in the beginning. The latter is specified by the spec. ‘The beginning’ is not an objective criterion. Hopefully the original spec can be updated to define a limit. |
@sanmai-NL works for me :) |
@nvuillam Do you have chance to review this small but impactful change soon? Can it be included in v7? |
@sanmai-NL it will be in 7.1.0 , sorry v7 has just been released :) Please can you check our comments with @Kurt-von-Laven about readability of the condition ? |
This pull request has been automatically marked as stale because it has not had recent activity. If you think this pull request should stay open, please remove the |
@sanmai-NL friendly ping ? :) |
I don't see unaddressed comments. |
@sanmai-NL please can you add I also think that there is some issue with the git delta in CHANGELOG.md |
This pull request has been automatically marked as stale because it has not had recent activity. If you think this pull request should stay open, please remove the |
@nvuillam I don't know exactly the what and why of your instructions. Can you make the required tweaks to this branch? |
This pull request has been automatically marked as stale because it has not had recent activity. If you think this pull request should stay open, please remove the |
/remove stale |
@sanmai-NL you need to merge conflicts to make your branch up to date :) |
Check a large but limited buffer from the start of the file. Do not assume UTF-8 encoding and text decode at all, but search for byte string. First check for the marker with the highest priority, to short-circuit return when it is found. This prevents performance problems with large files
@nvuillam Ready to merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution that should improve performances :)
Once CI is ok i'll merge :)
Check a large but limited buffer from the start of the file. Do not assume UTF-8 encoding and text decode at all, but search for byte string. First check for the marker with the highest priority, to short-circuit return when it is found.
This prevents performance problems with large files.
Proposed Changes
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breaking
if this is a large fundamental changeautomation
,bug
,documentation
,enhancement
,infrastructure
, orperformance