Holiday
Holiday

Reputation: 891

Is it performance-wise better to have a lot of small files or one big file in my server with all the requests?

My NodeJS server files are split into groups like for example delete.js, post.js, get.js, patch.js, etc. which contain all the requests for a specific request category. Since my requests can be quite large, some up to 100 lines, would it be alright to just have a file for each request, or would that kill the users' performance?

Upvotes: 0

Views: 229

Answers (1)

Elia
Elia

Reputation: 1443

NodeJs applications are evaluated at start time and all the relevant code (necessary for the execution) is loaded in memory so, how many files do you have for your code base doesn't matter.

Upvotes: 2

Related Questions