# Bad performance of eachline() on STDIN

**URL:** <https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701>\
**Category:** General Usage\
**Created:** [February 20, 2021, 9:20pm UTC](https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701 "2021-02-20T21:20:20Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![tferic](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tferic/32/12916_2.png) [@tferic](https://discourse.julialang.org/u/tferic)\
**Post date:** [March 3, 2021, 8:51am UTC](https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701/36 "2021-03-03T08:51:18Z")

</div>

As @ToucheSir pointed out, there is a similar issue in a related thread:

> [@Slow gzip streaming in julia but not in python](https://discourse.julialang.org/t/slow-gzip-streaming-in-julia-but-not-in-python/56346):
>
> Hi there, I am new to Julia, and come to Julia for performance with fewer codes. I have been using R, and encountered a simple task: read from a gziped file and do something to each line. It was slow in R, of course. So I went to Perl first. Here is the code: perl -e ' open( DATA, "zcat ~/in2/swxx/sj/db/ncbi/gene/gene2accession.gz|"); while( \<DATA\>) { @F = split( /\t/); } close( DATA);' I found the gzip command was using about 48% CPU of a thread. Then I came to Julia, and here is the code: …

---

_[View the full topic](https://discourse.julialang.org/t/bad-performance-of-eachline-on-stdin/55701)._
