I have to disagree. Bad performance is often a result of a death of a thousands cuts. This function might be one among countless similarly inefficient library calls, programs and so on.
The edit in the article says ~1.5kb
Though I believe the “naive” streaming read could very well be superior here.