5 ms·
For a few days, I've had the problem where the threads page (e.g., http://news.ycombinator.com/threads?id=zck http://news.ycombinator.com/threads?id=zck) takes
by zck 17y ago
For a few days, I've had the problem where the threads page (e.g., http://news.ycombinator.com/threads?id=zck http://news.ycombinator.com/threads?id=zck) takes a long time to load (> 30 seconds), and sometimes doesn't load at all, ending up with just a blank page -- no html is loaded.
- wvenable 17y agoThis has been happening to me for weeks.
- zmonteca 17y agoMonths for me. Seriously. I never have the patience to even visit the site because it's so slow. I rely solely on the hnyc_feed@chatterous.com gtalk service to chat top posts.
- pg 17y agoThis is a different problem from the one we're experiencing now. Threads takes a long time the first time because items are lazily loaded.
- zck 17y agoInteresting; I have noticed that once the threads page loads, it generally works fine the second time. I've been trying not to hammer on it too much to see when it works/doesn't work, though. I guess it's one way to tell if the server's been restarted since I last was here. :)
- lsb 17y agoWhy lazily load items yourself instead of use a database, like Postgres or even SQLite, that handles the paging in and out itself?
- gnaritas 17y agoBecause hacker news doesn't use a database, the site is file driven and runs entirely out of ram. Changes are made in memory and logged to disk and upon server restart, the files are lazily loaded on demand to prevent the need to load the entire db all at once. This might sound crazy but it's actually faster (once loaded) and easier to program than a relational database. As hacker news was a fun project for Paul, I'd imagine he doesn't want to touch a relational database with a ten foot pole; I don't blame him. You can get a long way without ever using a real database, files and in memory hash tables work fine up to a pretty decent amount of traffic. It only becomes problematic when you need more than one server.
- dkarl 17y agoThis has been happening to me since I signed up.