![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Registered User
Join Date: Feb 2008
Posts: 31
|
Optimization tip for GFY (enhanced loading time)
This tip is originally from Google.
To make the pages load a lot faster all repeating images should be replaced by just 1 image + CSS code. All smilies, all icons etc. should be on just one big image and the images should be placed with <div class="image_name"></div> code that will display the image as normally. It will bring down the requests per page to the server from 50-100 to just 1-2. It will have a big impact on loading time at the user side and lessens the load on the server. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
? how does that work? Do you specify a region of the big image to display?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jan 2004
Location: Scotland
Posts: 6,720
|
sounds like a cool idea
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
hmm, interesting, but does it actually work? I thought web browser caches the images, it's not like if the image is 50 times on a page it would download it 50 times....
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Aug 2005
Posts: 2,178
|
Quote:
it would work on initial view but afterwards it's all catched.
__________________
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Registered User
Join Date: Feb 2008
Posts: 31
|
Quote:
And not all browsers use caching that well or at all. It will save a lot of requests and requests add on loading time for the user. The loading time experience will be enhanced the most. The article is on google-code-updates @ blogspot |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Join Date: Feb 2008
Posts: 31
|
If you're a frequent visitor to code.google.com for product updates and reference materials for Google APIs you're working with, you might have noticed that the page loading time (or page rendering time depending on how you see it) has reduced in varying degrees in the past several weeks.
As you'll see below, we've made several changes to help reduce user-perceived latency. This is not an exhaustive list of all improvements we've made recently, but these are the major ones we've made. As Steve Souders emphasizes as the "Performance Golden Rule" in his book High Performance Web Sites, "only 10-20% of the end user response time is spent downloading the HTML document. The other 80-90% is spent downloading all the components in the page (p.5)". We agree. That's why we focused our effort on reducing the number and size of downloads (HTTP requests) for the "components" throughout Google Code. Combined and minimized JavaScript and CSS files used throughout the site Downloading JavaScript and CSS files blocks rendering of the rest of the page. Thus, to reduce the number of HTTP requests made on the initial page load, we combined frequently-used JavaScript and CSS files into one file each. This technique has brought down 20 HTTP requests down to just 2. We also minimized the files by stripping out unnecessary whitespace and shortening function/variable names whenever possible. Implemented CSS sprites for frequently-used images There are 7 images prominently used throughout Google Code, including the Google Code logo, the googley balls at the bottom of every page, the plus and minus signs as well as the subscribe icon inside each blog gadget. Although browsers usually download several images in parallel, we concatenated these images into one image so only one HTTP request would be made. Of course, concatenating several images into one required us to make several changes in HTML/CSS. For example, instead of having: Code:
<img src="/images/plus.gif" /> We had to change it to: Code:
<div style="background-image:url(/images/sprites.gif); background-position:-28px -246px; width:9px; height:9px">&</div></span> where sprites.gif is the concatenated image and background-position and width/height carefully calculated. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
North Coast Pimp
Join Date: Dec 2005
Location: 304-534-757
Posts: 9,395
|
I am sure gfy is already coded that way...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
GFY already has enhanced loading time. It feels like it's on packet radio.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Interesting idea. I already do the "whitespace" minimization on my CSS and javascript files and I tend to only ever use 1 of each instead of multiples...
The image thing is sort of cool... they've cut down from 7 connection and download requests to just the 1.. plus there's probably a bit of a size reduction as instead of having 7 image file headers there will be just 1. But before implementing it should be well thought out as you'll lose out on any SEO benifits from the alt tags of the images. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
The amount of work it would take to do that within each unique post wouldn't be worth the effort. And shutting off images doesn't really speed gfy up much either.
The only way VB is going to speed up is to re-write the hundreds of stupid calls they have.
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Jan 2004
Location: Scotland
Posts: 6,720
|
There must be some way of speeding it up though
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Time to try sprites on a thumb TGP?
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Bitblt will totally change the industry.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
A couple people turning off images isn't going to be noticeable.. BUT If they took all the common graphics that appear on every page/post and did that trick, that would be a LOT less server connection requests since it would effect everyone.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Gotta fix the backend before you shave 8.3% off your load time by fiddling with images
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 | |
Registered User
Join Date: Feb 2008
Posts: 31
|
Quote:
CSS designers almost all work that way, so I am sure it will be alowed by Google. Google also reads the <noscript> parts of your website. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Join Date: Jan 2008
Location: United Blingdom
Posts: 962
|
Is 56k coming back in fashion or summat?????
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Jul 2007
Posts: 7,687
|
thanks for that great tip.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 | |
Mostly retired
Industry Role:
Join Date: Apr 2006
Location: UK
Posts: 3,231
|
Quote:
As well as that, surely this concatenated image is simply going to be the size of all the sprites added together - but what if everyone only wants to use one sprite at, say, 130 bytes per sprite? For instance, your site has a total of 100 x 130 byte sprites for the user to choose from, making this concatenated image around 13 KB. Now, say 100 people load a thread page with 5 posts in, with each post having just 1 sprite - so each pageload, in sprite terms, causes 5 x 13 bytes = 65 bytes per user of bandwidth, which with 100 people's pageloads, causes around 6.34 KB of sprite bandwidth in total - verses one pageload from one user with the concatenated sprite causing over double that amount of 13 KB; 100 users pageloads with the concatenated sprite image would cause bandwidth to rocket to 100 x 13 = 1.26 MB. As the above was just a small example, I'm sure it's easy enough to see how this idea scales poorly when more than 100 pageloads are concerned. Not to mention, of course, you said that most browsers don't cache properly; so why would they magically not cache the 130 byte sprite, but suddenly decide to cache the 13 KB concatenated sprite? They wouldn't - so each consequent pageload by the same user would require yet another request for a 13 KB image, which is going to be slower than a few requests for a 130 byte image. And now to wait to be proven wrong - as always in life.
__________________
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Confirmed User
Join Date: Jun 2007
Posts: 443
|
Thanks for sharing that idea..
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 | |
Registered User
Join Date: Feb 2008
Posts: 31
|
Quote:
display:inline;width:100px;height:100px;background :... That's it. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Registered User
Join Date: Feb 2008
Posts: 31
|
vBulletin uses templates so it will be easy. It would also be possible to write a simple PHP class for it in vBulletin plugins so you could specify the images in AdminCP and then replace the default image locations automaticly (saves a lot of work and easyer to manage).
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 | |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
Quote:
That also won't work evenly in all browsers and it really won't speed anything up since the image calls isn't what slows gfy down.
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
The O is for Oohhh
Join Date: Feb 2003
Location: AUSTIN TEJAS
Posts: 10,861
|
There are messageboards using vB with shitloads more activity/users that run a lot faster than GFY and with lots of extra features, too.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Just Du It
Industry Role:
Join Date: Feb 2004
Posts: 12,094
|
i think if gfy gets rid of postingit will speed up too
|
![]() |
![]() ![]() ![]() ![]() ![]() |