←back to thread

257 points pg | 2 comments | | HN request time: 0.424s | source
Show context
earle ◴[] No.2120831[source]
HN only supports 20 req per second???
replies(3): >>2120860 #>>2120867 #>>2121955 #
PStamatiou ◴[] No.2120860[source]
flat files, no database
replies(1): >>2120885 #
pg ◴[] No.2120885[source]
That's not the bottleneck. Essentially there's an in-memory database (known as hash tables). Stuff is lazily loaded off disk into memory, but most of the frequently needed stuff is loaded once at startup.

The bottleneck is the amount of garbage created by generating pages. IIRC there is some horrible inefficiency involving UTF-8 characters.

replies(3): >>2120907 #>>2120945 #>>2121444 #
1. gills ◴[] No.2121444[source]
Are you using any sort of in-memory fragment caching? That seems like it might reduce some render overhead.
replies(1): >>2121617 #
2. pg ◴[] No.2121617[source]
A great deal, and it does.