Read the statement by Michael Teeuw here.
node_helper - using fs or request?
-
Hi guys,
for one module currently requested I have to load a csv file with ~100kb and lots of content sitting inside the module folder.
What do you think is more performant? Using request reading the file from “localhost” or using fs.readFile? Does it make any difference?Best regards,
Stefan -
@yawns for such a small set of work, either is about the same…
if u were doing this 20 times/second over hours, i might use the fs approach, but it depends on what you want to do with it later…
-
@yawns but… using the request approach would insulate you from changes needed to use a remote location source…
-
@sdetweil said in node_helper - using fs or request?:
@yawns but… using the request approach would insulate you from changes needed to use a remote location source…
That’s a valid point, yes. I doubt this will be necessary or possible, but you never know. If it makes no difference in performance I will stick with the request.
Thanks for your thoughts, Sam. Very much appreciated -
@yawns
I think performance of ‘fs’ is absolutely faster than ‘request’.