You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, all search results are written to an intermediate buffer in memory before being actually emitted to stdout. This is done to permit more efficient parallelism when searching. That is, only one thread can be writing to stdout at any point in time, but multiple threads can write to their own thread local memory buffer.
This does have undesirable end user consequences:
It can result in high memory usage when the number of search results is high.
When searching a single file, no output is seen until the search is complete.
We should be able to do quite a bit to fix these issues:
If a single file is given to search, then don't try any parallelism and make searching write to stdout directly.
If --threads 1 is given, then do (1) regardless of the number of inputs.
The text was updated successfully, but these errors were encountered:
For example, when only a single file (or stdin) is being searched, then we
should be able to print directly to the terminal instead of intermediate
buffers. (The buffers are only necessary for parallelism.)
ClosesBurntSushi#4.
Currently, all search results are written to an intermediate buffer in memory before being actually emitted to
stdout
. This is done to permit more efficient parallelism when searching. That is, only one thread can be writing tostdout
at any point in time, but multiple threads can write to their own thread local memory buffer.This does have undesirable end user consequences:
We should be able to do quite a bit to fix these issues:
stdout
directly.--threads 1
is given, then do (1) regardless of the number of inputs.The text was updated successfully, but these errors were encountered: