z

Young Writers Society


Speeding Up YWS



User avatar
425 Reviews



Gender: Male
Points: 11417
Reviews: 425
Sat Aug 26, 2006 7:21 pm
Nate says...



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
863 Reviews

Supporter


Gender: Male
Points: 2090
Reviews: 863
Sat Aug 26, 2006 7:38 pm
Griffinkeeper says...



Good call!
Moderator Emeritus (frozen in carbonite.)
  





User avatar
161 Reviews



Gender: Female
Points: 890
Reviews: 161
Sat Aug 26, 2006 7:51 pm
Cassandra says...



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: Male
Points: 6040
Reviews: 142
Sat Aug 26, 2006 7:57 pm
Doctor Kitty says...



Good idea. :)

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





User avatar
425 Reviews



Gender: Male
Points: 11417
Reviews: 425
Sat Aug 26, 2006 8:04 pm
Nate says...



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
459 Reviews



Gender: Female
Points: 10092
Reviews: 459
Sat Aug 26, 2006 8:09 pm
Poor Imp says...



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
145 Reviews



Gender: None specified
Points: 890
Reviews: 145
Sat Aug 26, 2006 8:14 pm
Skye says...



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
161 Reviews



Gender: Female
Points: 890
Reviews: 161
Sat Aug 26, 2006 8:16 pm
Cassandra says...



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
3821 Reviews

Supporter


Gender: Female
Points: 3891
Reviews: 3821
Sat Aug 26, 2006 9:32 pm
Snoink says...



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
863 Reviews

Supporter


Gender: Male
Points: 2090
Reviews: 863
Sat Aug 26, 2006 10:06 pm
Griffinkeeper says...



I'm experiencing the same problem.
Moderator Emeritus (frozen in carbonite.)
  





User avatar
798 Reviews



Gender: Female
Points: 17580
Reviews: 798
Sat Aug 26, 2006 10:38 pm
Areida says...



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
114 Reviews



Gender: Male
Points: 890
Reviews: 114
Sun Aug 27, 2006 12:50 am
David Guinness says...



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
425 Reviews



Gender: Male
Points: 11417
Reviews: 425
Sun Aug 27, 2006 4:35 am
Nate says...



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
114 Reviews



Gender: Male
Points: 890
Reviews: 114
Sun Aug 27, 2006 4:51 am
David Guinness says...



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
425 Reviews



Gender: Male
Points: 11417
Reviews: 425
Sun Aug 27, 2006 5:02 am
Nate says...



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.
  








In the winter months, gale storms in Svalbard can reach wind speeds of 130 km/h. Accompanied by or following snowfall, such storms can reduce visibility dramatically, more so in the winter months of the polar night. During these storms, travel is not advised.
— The Documentarian