Speeding Up YWS

19 posts1, 2
User avatar
Gender Male
Points 11542
Reviews 426
I'm now in the process of tweaking the code to speed up the site. While most of the loading times are due to the fact that YWS is on a shared server, some of the loading times are due to a lot of queries being passed back and forth between the site and the database. To reduce all that, I'm caching a lot of those queries for any pages that take the server more than a second to generate.

For most of the pages on YWS, the server generates the page in .5 seconds. But it used to take the server up to 7 seconds to generate the front page. I managed to reduced that to just .3 seconds with caching. But what that means is that stuff will not be instantly updated on the front page. That is, it may take a while for something new (such as a new post) to show up on the front page. But I think that's a small price to pay for lower loading times.

In any case, I think I may move the site to a new hosting provider, such as hostway. The current provider is Yahoo Small Business, and I'm not happy with it. The server speed is inconsistent, I can't send out newsletters, and the server is unreliable. Hostway has a much better reputation, and I'm hoping that if I move the site over there, YWS would run a lot faster.
Last edited by Nate on Sat Aug 26, 2006 7:46 pm, edited 1 time in total.




User avatar
Gender Male
Points 2702
Reviews 867
Good call!
Moderator Emeritus (frozen in carbonite.)




User avatar
Gender Female
Points 890
Reviews 161
Sounds good to me. :D
"All God does is watch us and kill us when we get boring. We must never, ever be boring."
-Chuck Palahniuk




Random avatar
Gender None specified
Points 6040
Reviews 142
Good idea. :)

Thankies. I've been having some trouble with slowness-ness-ness...




User avatar
Gender Male
Points 11542
Reviews 426
Right now, I'm really only testing the caching on the front page since that was the biggest lagger. If anyone is noticing long load times anywhere, with the exception of the My YWS page, let me know here.

To test to see if the front page is loading faster for you, load that one first then load the My YWS page. The two pages have the same code. The difference is that the front page is now cached while the My YWS page is not. For me, I've noticed a huge difference between the two.




User avatar
Gender Female
Points 14789
Reviews 483
Good idea, Nate...

First page loads in a split-second for me. My YWS takes a good five -eight seconds. !_!
ex umbris et imaginibus in veritatem

"There is adventure in simply being among those we love, and among the things we love -- and beauty, too."
-Lloyd Alexander




User avatar
Gender None specified
Points 890
Reviews 145
The homepage took less time than saying "one-one-thousand" while the MyYWS page took 12 seconds. :shock:
"A poet in love is best encouraged in both capacities or neither." ~ Jane Austen, Emma.




User avatar
Gender Female
Points 890
Reviews 161
Wow. :shock: DEFINITELY a lot faster. Great work!
"All God does is watch us and kill us when we get boring. We must never, ever be boring."
-Chuck Palahniuk




User avatar
Gender Female
Points 9692
Reviews 3900
Yup, it's DEFINITELY faster.

Except the chat. The chat is EXTRA scary today...

EDIT: But I think the cache is making the recent topics on the home pagestay the same from when I first came here today, and that's driving me crazy. O_o
Ubi caritas est vera, Deus ibi est.

"The mark of your ignorance is the depth of your belief in injustice and tragedy. What the caterpillar calls the end of the world, the Master calls the butterfly." ~ Richard Bach

Moth and Myth <- My comic! :D




User avatar
Gender Male
Points 2702
Reviews 867
I'm experiencing the same problem.
Moderator Emeritus (frozen in carbonite.)




User avatar
Gender Female
Points 17580
Reviews 798
The homepage has been really slow loading for me ever since YWS got back up, but now it's loading normally again. I haven't noticed any particularly slow pages, but I haven't used myYWS lately.
Got YWS?

"Most of us have far more courage than we ever dreamed we possessed."
- Dale Carnegie




User avatar
Gender Male
Points 890
Reviews 114
The Recent Topics column hasn't changed in at least five hours, as Snoink mentioned. (Clearing my temp files didn't help, so it's definitely server-side-cache-related.)

Other than that, the caching is great. Even MyYWS loads faster than it used to, for whatever reason.
David Guinness




User avatar
Gender Male
Points 11542
Reviews 426
Yep, I noticed the recent topics thing too. Unfortunately, it seems that the recent topics block is the cause for the slow loading times. Taking off the caching just for that increases the load time by six seconds, and sometimes more. I'm going to check to see tomorrow if there's something I can do to tweak the code for that.




User avatar
Gender Male
Points 890
Reviews 114
Could you just place in that spot a link to a Recent Topics page (similar to the Posts Since Last Visit thread)?

Or possibly a Recent Topics popup window, like the PM notification one?

Or (and I realize it would probably be a real pain to code) a Recent Topics minimize/maximize box?

-Just some ideas.
David Guinness




User avatar
Gender Male
Points 11542
Reviews 426
I could do one of those, and I was thinking about the first one you brought up especially, but I really like having the recent topics listed on the front page for easy viewing. But, on the other hand, it's very aggravating to wait 10, sometimes even 30 seconds for the site to load.



There has never been a sadness not cured by breakfast food.
— Ron, Parks & Rec