Thread: Smilies are slow at loading "Post New Thread" page.
-
Aug 2nd, 2004 09:28 PM
#1
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 01:45 PM.
-
-
Aug 4th, 2004 09:45 AM
#2
No one has any commment to my post? Hum...
-
Aug 4th, 2004 09:49 AM
#3
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.
-
Aug 4th, 2004 09:56 AM
#4
Yea. sometimes I feel it is dead slow loading the icons too... But once it is cached, it should be ok.
-
Aug 4th, 2004 10:08 AM
#5

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?
-
Aug 4th, 2004 10:10 AM
#6
But aren't you a programmer?
Suggesting that something be hard coded. You should know better.
-
Aug 4th, 2004 10:15 AM
#7

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 10:19 AM.
-
Aug 4th, 2004 10:32 AM
#8

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.
-
Aug 4th, 2004 10:39 AM
#9

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.
-
Aug 4th, 2004 10:57 AM
#10
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.
-
Dec 12th, 2004 09:34 AM
#11
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 09:49 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules