We should improve \cat, \grep, \tail, \more, etc so that they should only read standard input using non-buffered I/O when needed; otherwise, buffered I/O should be performed. See issue #7875 for a test case and a profiling result.
Made change to the following commands so that they might use buffered I/O to read input from standard input under certain conditions:
\cat, \grep, \more, \tail, \tee
SVN trunk/r30034.
*** Please run a regression test on commands listed above. ***
> cat enwiki-20121001-pages-articles-multistream-index.txt | cat > tmp.txt
> cat enwiki-20121001-pages-articles-multistream-index.txt | tee > tmp.txt
These commands used to take ~1 minute 35 seconds to complete on my desktop; after r30034 is applied, the execution time goes down to ~6 seconds.
Issue #7876 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build trunk/30034 |
No time estimate |
1 issue link |
relates to #7875
Issue #7875Performance problem on command pipeline |
Made change to the following commands so that they might use buffered I/O to read input from standard input under certain conditions:
\cat, \grep, \more, \tail, \tee
SVN trunk/r30034.
*** Please run a regression test on commands listed above. ***
> cat enwiki-20121001-pages-articles-multistream-index.txt | cat > tmp.txt
> cat enwiki-20121001-pages-articles-multistream-index.txt | tee > tmp.txt
These commands used to take ~1 minute 35 seconds to complete on my desktop; after r30034 is applied, the execution time goes down to ~6 seconds.