technical site tuneup and other ideas

i did some poking around the site resources and thought i'd add a few things i could think of to improve site performance/reduce server load.

mostly basic stuff

1. offload javascript and minimize. there looks to be a lot of js included directly in the page that does not change. this could be moved into a separate file which could be cached so it would not have to be re-downloaded with every page request. this also makes it easier to run through a minimizer. i like microsoft's ajax minifier (I think it's here http://ajaxmin.codeplex.com/releases/view/62170) but there are lots of options out there.

2. replace individual icons with css sprites. take all those trophies other badges and put them in one image sheet and use css classes to select a slice for a particular page element. i did a clean load of the server donate thread and it was around 160 requests to the server. i think a lot of those could be merged into a sprite setup. that would also mean just a few requests to the server to make sure the browser has the latest version of whatever resource.

more advanced

3. set up a separate domain to host all the media on the site. allows images to be retrieved without cookies being tacked on to the request. for example, the stackexchange sites use http://sstatic.net/

crazy stuff.

4. set up a private bittorrent tracker to distribute the e-zines. i assume people downloading e-zines accounts for a lot of traffic given the size of the files. distributing these via torrent would offload a lot of the demand for them. a private tracker can still be set up to prohibit non-users from getting at the files. (i've never run a tracker but i know it's possible to have this arrangement).


these are the big ones I came up with. if i think of others i'll add more posts. i'd encourage anyone else with web experience to kick in ideas here too.

Comments

  • Javascript and such scripts are manily text, those don't affect server much I wouldn't think. I guess the icons idea is good, but even with 100 or so people online, it's not really saving data but just transferring it all at once. I'm not sure how much improvement that'd add to the site, or if it'd be worth even doing. But we'll see what they say I hope.
  • Originally posted by: 3GenGames

    Javascript and such scripts are manily text, those don't affect server much I wouldn't think. I guess the icons idea is good, but even with 100 or so people online, it's not really saving data but just transferring it all at once. I'm not sure how much improvement that'd add to the site, or if it'd be worth even doing. But we'll see what they say I hope.

    Actually, the 1st suggestion to offload the javascript would do a lot to help page performance.  Suggestion 4 is interesting as well, it would just be a matter of maintaining enough seeds to be worth it.  I smell a new forum icon for e-zine seeders image


  • These are all good ideas, but these are what I consider "small fry" for performance. Sure they'll help some, but they won't help with JVM tuning. The bottleneck isn't bandwidth, it's throughput from ColdFusion. The real performance improvements are seen with database indexing/maintenance and having enough memory for Java to go ballistic during peak times.

    The problem is already known: we have a database server and web server sharing the same physical machine, and that machine has a whole 2 GB of memory.

    On a side note, I use an icon sprite in the collection tool but haven't converted the other there yet. I may still try to trim down the # of non-CFML requests to reduce my apache log files! image

  • I don't know enough about the technical stuff but those sound like interesting ideas. For things like the ezine (4) I would bet there are other more generic file hosting sites that could be used. Wouldn't all the icon/image (2) caching already be done by the browser? I think it was mentioned that jrun is a bottleneck, would that be helped with (1)?



    All those put together may not affect the load too much for the amount of work needed. From what I have been told the main problem is the database and forums are on the same server. Database wants 100% RAM, so its fighting with the rest of the site for resources. Splitting into two servers may get much more than double the performance.

    Edit: see above for better answer, I type slow  image
  • If Javascript is slow, get a better browser. They can't fix that I don't think. The amount of Javascript this page runs isn't that much. It only seems like that since it runs the jquery library or whatever, that's what is slow on the page. And I have an idea, get rid of the jquery or whatever is updating the messages update. (Maybe more feature but I am not sure, as that's the only one I've noticed.) That'll stop users just sitting on a page taking up some of the resources. Plus, is it really a feature needed that badly? It can update every page and be fine with me. But I guess if it isn't bandwidth problem but a server resources problem, I guess this doesn't matter much. image 


    But those two programs/services trying to eat the same resources sounds messy, and can't wait to see how much performance is gained after the fix. image

    And am I reading this right? This site is running off Java? You've got to be kidding....?
  • The inbox notification actually *reduces* load because before we had that, people were reloading the page over and over all day long waiting for new messages to arrive, create a lot of unnecessary full-page reloads. This feature is very efficient from a load perspective.



    As for JavaScript, we use a tiny amount compared to most sites. jQuery is actually pretty fast, and we're using the 'min' version, but I do load a few libs that aren't being utilized, so that could be enhanced. But realistically, these are cached in your browser, so you're not re-downloading them on every request.



    There are always ways to cut corners and improve performance, but you have to weigh the cost of implementing them vs. the realistic gain.
  • damn dain, i just tossed an old computer with 1GIG Mem chip image i woulda sent it to ya . image
  • I've implemented some sprites and combined a ton of CSS/JS to see if that helps some. I may also create a media domain to prevent cookies from piggybacking on media requests, but that will probably take a little more time.
  • Just implemented NintendoAgeMedia.com for many images (will convert as time permits). This should reduce http header traffic some.
  • cool! I'm curious to know how that works out. One of my projects at work is a site with around 1gb of photos and I think it would be a good candidate for that treatment (if I ever get clear of fixing everything else).



    I deal a lot in js at work so I'm happy to help if you need anything - change/review/whatever. coldfusion makes me want to punch myself in the face though
  • Is the clock off for people by an hour for their time zone?
  • ^clock should be correct now. The server was configured in a difference time zone and I didn't see it until after I brought it online.
Sign In or Register to comment.