hide   Compare prices on Computers & Electronics at our sister site, PriceCanada.com!
Stretch interface sizeReset interface & text size
Go Back   RedFlagDeals.com Forums > Site Comments & Suggestions

Reply  
 
Thread Tools
Old Aug 2nd, 2004, 10:28 PM   #1 (permalink)
Deal Fanatic
 
Join Date: Apr 18th, 2003
Location: Shek-O (by the beach), Hong Kong
Posts: 8,610
Send a message via ICQ to chatbox Send a message via MSN to chatbox
Default Smilies are slow at loading "Post New Thread" page.

Thought of something that should free up some server resources.

Can you not embed the smilies images into the HTML page (well, you can, but will you?)? Because when the page loads, the browers then makes 20 something connections to the server to download the smilies. It's very inefficient for the server and browers (over head of the tcp/ip handshake and connection termination). But if you embed the smilies images into the HTML page, then it's all done with one page.

Any suggestions?

Last edited by chatbox; Aug 3rd, 2004 at 02:45 PM..
chatbox is offline  
Send a private message to chatbox Reply With Quote
Sponsored Links - Join the RedFlagDeals.com community and remove this ad.
Old Aug 4th, 2004, 10:45 AM   #2 (permalink)
Deal Fanatic
 
Join Date: Apr 18th, 2003
Location: Shek-O (by the beach), Hong Kong
Posts: 8,610
Send a message via ICQ to chatbox Send a message via MSN to chatbox
Default

No one has any commment to my post? Hum...
chatbox is offline  
Send a private message to chatbox Reply With Quote
Old Aug 4th, 2004, 10:49 AM   #3 (permalink)
Deal Guru
 
Carnage's Avatar
 
Join Date: Aug 19th, 2003
Location: Waterloo,Ontario
Posts: 11,219
Send a message via ICQ to Carnage Send a message via AIM to Carnage Send a message via MSN to Carnage Send a message via Yahoo to Carnage
Default

Which would also make it harder to change later.

Hard coding the images would force you to manually edit the page and add/remove new images,etc.

And even hard coding it probably wouldn't speed it up much.
Carnage is offline  
Send a private message to Carnage Reply With Quote
Old Aug 4th, 2004, 10:56 AM   #4 (permalink)
Deal Addict
 
[H]ackerK's Avatar
 
Join Date: Aug 27th, 2003
Posts: 4,457
Default

Yea. sometimes I feel it is dead slow loading the icons too... But once it is cached, it should be ok.
[H]ackerK is offline  
Send a private message to [H]ackerK Reply With Quote
Old Aug 4th, 2004, 11:08 AM   #5 (permalink)
Deal Fanatic
 
Join Date: Apr 18th, 2003
Location: Shek-O (by the beach), Hong Kong
Posts: 8,610
Send a message via ICQ to chatbox Send a message via MSN to chatbox
Default

Quote:
Originally Posted by Carnage
Which would also make it harder to change later.

Hard coding the images would force you to manually edit the page and add/remove new images,etc.

And even hard coding it probably wouldn't speed it up much.
I don't think it's going to be that often that RFD will be changing these smilies icons...once per year maybe.

Might worth a try...

Now, the strange thing is, even when the icons are cached locally, the browser still seems to try to fetch them off the net...why's that?
chatbox is offline  
Send a private message to chatbox Reply With Quote
Old Aug 4th, 2004, 11:10 AM   #6 (permalink)
Deal Guru
 
Carnage's Avatar
 
Join Date: Aug 19th, 2003
Location: Waterloo,Ontario
Posts: 11,219
Send a message via ICQ to Carnage Send a message via AIM to Carnage Send a message via MSN to Carnage Send a message via Yahoo to Carnage
Default

But aren't you a programmer?

Suggesting that something be hard coded. You should know better.
Carnage is offline  
Send a private message to Carnage Reply With Quote
Old Aug 4th, 2004, 11:15 AM   #7 (permalink)
Deal Fanatic
 
Join Date: Apr 18th, 2003
Location: Shek-O (by the beach), Hong Kong
Posts: 8,610
Send a message via ICQ to chatbox Send a message via MSN to chatbox
Default

Quote:
Originally Posted by Carnage
But aren't you a programmer?

Suggesting that something be hard coded. You should know better.
LoL...hard coding isn't always bad. Hard coding can sometimes make processing faster, more stremlined.

The other thing the admin can try, instead of having the smilies coded into the HTML page (as my first suggestion). Maybe you can try to compress all the smilies into one package. So, the browser will cache this one particular package and if checking for up-to-date version of the package is needed, there's only one connection that needs to be made, rather than 20-something checking connections.

I just found out why somethings (and not always) the 20-something connections are made. The damn cache only cache files for the life-time of the particular process of the browser. So, if I close down the browser and start another one, then try to post a reply, the 20-something connections (check up-to-date files) are made. Where as if I keep the same browser running, the it only needs to load the images once. i.e. subsequent process of the browser don't seem to know the pre-existance of the locally cached files....

Last edited by chatbox; Aug 4th, 2004 at 11:19 AM..
chatbox is offline  
Send a private message to chatbox Reply With Quote
Old Aug 4th, 2004, 11:32 AM   #8 (permalink)
Deal Guru
 
Carnage's Avatar
 
Join Date: Aug 19th, 2003
Location: Waterloo,Ontario
Posts: 11,219
Send a message via ICQ to Carnage Send a message via AIM to Carnage Send a message via MSN to Carnage Send a message via Yahoo to Carnage
Default

Quote:
Originally Posted by chatbox
LoL...hard coding isn't always bad. Hard coding can sometimes make processing faster, more stremlined.
True.

But it can also make pages a nightmare to debug at a later date. Instead of changing one value, you need to change the hard coded value in the pages.

But regardless of that do they actually have the ability to do what you mentioned? I don't imagine they're going to want to start modifying a 3rd party board software.
Carnage is offline  
Send a private message to Carnage Reply With Quote
Old Aug 4th, 2004, 11:39 AM   #9 (permalink)
Deal Fanatic
 
Join Date: Apr 18th, 2003
Location: Shek-O (by the beach), Hong Kong
Posts: 8,610
Send a message via ICQ to chatbox Send a message via MSN to chatbox
Default

Quote:
Originally Posted by Carnage
True.

But it can also make pages a nightmare to debug at a later date. Instead of changing one value, you need to change the hard coded value in the pages.

But regardless of that do they actually have the ability to do what you mentioned? I don't imagine they're going to want to start modifying a 3rd party board software.
Embedding images into the page is easy really...Basically you just add the images data to the bottom/end of the page. And reference them from the HTML code. The code for the current images are hard coded anyway. You're just going to need to reference them from a slightly different location. Therefore, relatively speaking, it's not really more hard code than what it is now.

I'm pretty sure that they can mod the board software, just a matter of "will they". I do believe it can unload some stress from the server.
chatbox is offline  
Send a private message to chatbox Reply With Quote
Old Aug 4th, 2004, 11:57 AM   #10 (permalink)
Deal Guru
 
Carnage's Avatar
 
Join Date: Aug 19th, 2003
Location: Waterloo,Ontario
Posts: 11,219
Send a message via ICQ to Carnage Send a message via AIM to Carnage Send a message via MSN to Carnage Send a message via Yahoo to Carnage
Default

Well I'm pretty sure the smilies aren't hard coded in the way you're thinking. The page is done useing PHP. So those image tags are probably dynamically written when you load the page. Of course it's hard to say for sure without seeing the code itself.

Maybe I'm not following you, but I don't think what you're trying to say is really possible.

And even if they did make the changes you're saying, I really doubt it would make a whole lot of an impact on the server.
Carnage is offline  
Send a private message to Carnage Reply With Quote
Old Dec 12th, 2004, 10:34 AM   #11 (permalink)
Deal Addict
 
Join Date: Dec 12th, 2004
Location: Montréal, QC
Posts: 2,912
Default

I wonder who the hell setup this...
A request is first made to http://www.redflagdeals.org (which is running Microsoft IIS 6.0 with Keep-Alive turned off) THEN an 302 Found header issued back to the browser redirecting him to http://www.redflagdeals.com (Apache with Keep-Alive)
So for every single file/images, a new connection have to be opened/closed, thus adding lots of overhead as you can see

When Keep-Alive is enable, a single connections can handle all requests and with pipelining enabled (not sure about IE, but it's enabled by default in Opera and optionally in FireFox), your browser can send multiple requests at the same time instead of waiting for a response file by file

The downside of having Keep-Alive (which is why I believe it's turned off) is that it adds some to the server load since connections are kept opened longer
By default, Apache will wait 30 secs before discarding it
This can be lowered to a more reasonable delay, like 3 to 5 secs, more than enough for most broadband users

If your guys are looking for a way to improve the site speeds, I strongly suggest you to use a thread based httpd, such as:
lighttpd - PHP via fastcgi (w/load balancing)
LiteSpeed - PHP via fastcgi

Static file hosting:
Boa
thttpd - no keep alive support yet

Much faster than Apache at handling static content such as images

Edit: Corrected servers confusion, .org = IIS, .com = Apache

Last edited by Daijoubu; Dec 12th, 2004 at 10:49 AM..
Daijoubu is offline  
Send a private message to Daijoubu Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


All times are GMT -5. The time now is 06:51 PM.






Copyright © 2000 - RedFlagDeals.com, a division of Clear Sky Media, Inc. All rights reserved. (Terms of Use, Privacy Policy)
Close this bar

Welcome to RedFlagDeals.com - Canada's Largest Bargain Hunting Community!

If this is your first visit, the most popular forums are:

  • Hot Deals - Deals from retailers all across Canada
  • Freebies - Free samples that you can sign up for online
  • Contests - Contests from around the Internet
Sign up now!

Why join RedFlagDeals.com?

Join a community of over 200,000 bargain hunters from all across Canada. As a member you can post comments, ask questions, and share deals, coupons, and freebies! Best of all, signing up is free!