Skip to content
Snippets Groups Projects
Commit e40148cc authored by Georges Racinet's avatar Georges Racinet
Browse files

SearchFilesByContent: improving memory efficiency

This iterator-based approach just keeps a small window of up to 3
lines in RAM, instead of the full list previously obtained with
splitlines()`).

It uses `collections.deque` (natively implemented), to make sure the
window will never be reallocated. On the other hand, matching lines
are allocated afresh, which is expected not to be a problem.

At this point, further improvements should take the form of an implementation
in RHGitaly.
parent e05bb0fc
No related branches found
No related tags found
2 merge requests!191Merged stable branch into default,!190RepositoryService.SearchFilesByContent
Pipeline #71228 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment