---
title: "Discussion on \"Reading a Large File With Streams Instead of readFileSync in Node.js\" | Hashnode"
description: "Discussion on \"Reading a Large File With Streams Instead of readFileSync in Node.js\". A server I work on writes request logs. One day I needed to count lines in a day's worth — about 8 million lines, 505 MB on disk — and my first instinct was the obvious one:\nconst data = fs.readFileSy"
url: "https://hashnode.com/posts/reading-a-large-file-with-streams-instead-of-readfilesync-in-node-js/6af55dd674ce2f39ff0f8b7d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Reading a Large File With Streams Instead of readFileSync in Node.js](https://aheadkit.hashnode.dev/reading-a-large-file-with-streams-instead-of-readfilesync-in-node-js?utm_source=hashnode&utm_medium=feed)

A server I work on writes request logs. One day I needed to count lines in a day's worth — about 8 million lines, 505 MB on disk — and my first instinct was the obvious one: const data = fs.readFileSy

5d ago · 5 min read · aheadkit.hashnode.dev  
Read the article

-   [#node](https://hashnode.com/tag/node)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming](https://hashnode.com/tag/programming)
-   [#performance](https://hashnode.com/tag/performance)

## Written by

[Abdus Salam](https://hashnode.com/@aheadkit)

@aheadkit

  
[View profile](https://hashnode.com/@aheadkit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
