Speeding Up YWS

19 posts1, 2
User avatar
Gender Male
Points 11542
Reviews 426
Aha! Fixed it, I think. Did a little research, and found how to write the cache for the recent topics block to a specific file. However, that file gets deleted every time someone makes a new post. Then that forces a new cache file to be created.

In any case, what that means is that every now and then, the front page will still take some time to load as the server will be busy writing the new cache. But most of the time, the front page should load in a split second.




User avatar
Gender Male
Points 890
Reviews 114
That's wonderful, Nate. I've tested the front page twice just now. The initial load to the domain took about 10 seconds, and the second time took 6 seconds. Both times the loading was very clean- Although it took a little longer than you'd like, everything appeared on the screen at the same time, instead of each image file loading up separately.

BTW: Individual posts, especially ones from the View Posts Since Last Visit screen, load up lightning fast. :)
David Guinness




User avatar
Gender Male
Points 11542
Reviews 426
Some info...

The front page caching has been turned off until I figure out how to make the recent topics list work properly. The method I worked out and described above actually increase load times.


User profiles were another area that took a long time to load, so I went through the code and discovered it was due to the "Who's viewed my profile" addition. Getting rid of that reduces load time from 7 seconds to .2 seconds. If you liked "Who's viewed my profile," it's gone now. I'm not entirely happy with that myself, but I much rather have something load immediately than twiddle my thumbs.




User avatar
Gender Male
Points 890
Reviews 114
Well, perhaps it's a good thing that the profile thing's gone. I don't really want to know if a certain member has viewed my profile 763 times. :D

Hm...Even without the front page caching, it's still loading up much faster than it used to.
David Guinness



I see no reason to celebrate the random timing of natural events by eating poison and singing.
— Dilbert