This application is designed to compare the fs.readFile
and fs.createReadStream
methods in Node.js. The goal is to evaluate the file opening times and the asynchronous response times of these functions.
- UI Layer: The application includes a user interface that allows easy switching between file processing methods and selecting the appropriate file based on its size.
- Method Comparison: Users can choose between
fs.readFile
andfs.createReadStream
methods and observe the differences in file processing times.
-
Install dependencies:
npm install
-
Run the application:
npm start
-
Access the application: Open your browser and go to
http://localhost:3000
.
The CSV files in the public
folder are not included and need to be placed there. The required files are (the size values are only suggested as a good example for benchmark and demo purposes, but feel free to modify):
micro.csv
<1kBsmall.csv
~61Mbmiddle1.csv
~350Mbmiddle2.csv
~670Mbbig.csv
~1050Mbhuge.csv
>2GB
This project is licensed under the MIT License.