Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mine often times out. When I hit refresh after a timeout it loads though, I guess I'm hitting the cache the second time.


The first request is slow because lazy loading means news has to load stuff from disk. That's why the second request is much faster.

I could fix this by only loading stuff the moment I need to display it. Right now I load enough to generate 7 pages of threads, but people rarely click on the More link, so I'm dragging a lot of items into memory unnecessarily.

I'll try fixing this when I have time. Unfortunately I have to write a talk right now, and this is going to require turning some code inside out.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: