Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Mark huge rls-analysis test data files as binary to filter greps #1732

Merged
merged 1 commit into from
May 3, 2021

Conversation

joshtriplett
Copy link
Member

When doing a git grep (of rls or of rust-lang/rust with
--recurse-submodules), if the grep happens to match within the huge
rls-analysis test data files, the resulting multi-megabyte single-line
can cause a text pager to grind to a halt and have trouble scrolling
(especially scrolling backwards).

These test data files are autogenerated and aren't formatted for human
consumption, so mark them as binary, which causes git grep to instead
just state that they match without printing the matching "line".

When doing a `git grep` (of rls or of rust-lang/rust with
`--recurse-submodules`), if the grep happens to match within the huge
rls-analysis test data files, the resulting multi-megabyte single-line
can cause a text pager to grind to a halt and have trouble scrolling
(especially scrolling backwards).

These test data files are autogenerated and aren't formatted for human
consumption, so mark them as binary, which causes `git grep` to instead
just state that they match without printing the matching "line".
@joshtriplett
Copy link
Member Author

The CI failures seem to be entirely unrelated.

@joshtriplett
Copy link
Member Author

Update: these json files seem to be triggering some major performance issues in git grep: a git grep -l 'not.*abc' will spend a massive amount of time searching, probably doing some kind of backtracking.

@Xanewok Xanewok merged commit 378076f into rust-lang:master May 3, 2021
@Xanewok
Copy link
Member

Xanewok commented May 3, 2021

Makes sense, thanks and sorry for the delay!

@joshtriplett joshtriplett deleted the opaque-rls-analysis-json branch May 3, 2021 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants