Large animated video clip GIFs slow down my browser. The effect is cumulative, so, for example, if there are several posts from someone who uses a video clip of a goat stomping on a man as a signature, my browser will freeze up for as much as a minute when the page first loads.

Less nerdy visitors here may not realize that the animated GIFs are causing their browser to slow down or freeze up. They may think that the forum itself is very very slow. They may find it helpful to know that:

On Firefox and Internet Explorer, you can press the Escape key to stop animated images from playing. Or, if AdBlock is installed in Firefox, right click on the image to block it permanently.

Chrome and Safari do not have a built in way to block images. On a Mac, I think the easiest way is to just block the website that the offending signature loads from, by editing the /etc/hosts file and adding the line:
127.0.0.1 4gifs.com

I am posting this here because I do not know if there is an appropriate place here for a nerdy tech tip.

rodiponer wrote:Chrome and Safari do not have a built in way to block images. On a Mac, I think the easiest way is to just block the website that the offending signature loads from, by editing the /etc/hosts file and adding the line:127.0.0.1 4gifs.com

I am posting this here because I do not know if there is an appropriate place here for a nerdy tech tip.

Thanks for posting this information, rodiponer. I thought it was my computer that was the problem. Being a bit less technically inclined, can you tell me where to find the /etc/hosts file? I did a search but nothing showed up. I'm on a MacBook Pro using Safari.

Deb Prothero wrote:Thanks for posting this information, rodiponer. I thought it was my computer that was the problem. Being a bit less technically inclined, can you tell me where to find the /etc/hosts file? I did a search but nothing showed up. I'm on a MacBook Pro using Safari.

Hi Deb,
I am not sure how to do this on the polite graphical side of the Mac, so here is the nerdy way I would do it:

1- Open a Terminal window by pressing command-spacebar, then typing Terminal and pressing enter.
2- Copy and paste this line into the terminal window, then press enter:

sudo sh -c "echo '127.0.0.1 4gifs.com' >> /etc/hosts"

3- Type in the password to your macbook
4- Done.

I have a recent MacBook Pro (2ghz dual core), and this is a problem on all of the browsers that are available for this computer. One stomping huggy mule is not a problem, but several on one page will nearly freeze the browser up.

rodiponer wrote:I have a recent MacBook Pro (2ghz dual core), and this is a problem on all of the browsers that are available for this computer. One stomping huggy mule is not a problem, but several on one page will nearly freeze the browser up.

I'm sorry but if anyone had a problem going through the thread, they should get their computer maintained. there has got to be someone good in the neighborhood that can make the computer work faster that isn't gonna cost more than 35-60 bucks. The investment is worth at least that much.
If anyone's computer or browser crashes through this thread there really is something wrong with your computer.

The current Chrome for Mac doesn't allow plugins, so my browser is completely the same as everyone elses. I don't know how browsers work internally, but a problem that is very specific to decoding large animated GIFs does not seem like something that could be impacted by a conflict with other software on this computer. The animations render at a reasonable speed, it just takes forever to initially load them. Decoding a GIF is not rocket science, even I was able to write a specialized GIF decoder for an embedded game a few years ago, and I am extremely lazy.

So I am not sure why the goat stomping the man is a problem for some people and not for others. But I think it is likely that some people with completely fine computers can have a problem with it. I bet it comes down to the amount of free memory you have when you load the page, since this is proportional to the number of stomping goats on a page and explains why people with similar processors don't have a problem watching ten goats stomp a man at once.

Each GIF probably takes enough memory for every frame of the animation in 24 bit color (width*height*frames*2), which could easily by 10 megabytes for a stomping goat. If the programmer who wrote the decoder wasn't thinking of GIFs with a lot of frames when he wrote it, he might have done something inefficient like allocate this memory in a series of chunks for each frame as he decode the image, instead of doing it all at once. So 10 stomping goats at 100 frames is 1,000 memory allocations of 100k that add up to 100 megabytes. If the computer has to swap memory to disk to make room for that, and it has to keep swapping it to disk in small chunks over and over again instead of doing it all at once, that would explain why the computer freezes up for thirty seconds or a minute while it works through making room for each moment of the goat stomping, one little stomping bit at a time.

If someone has slightly more free memory, there is no swapping and the goat can be decoded and start stomping nearly instantly.

This has been a known bug with WebKit based browsers for a long time-- both Safari and Chrome are affected. Things like this sound easy to fix, just cache the friggin image and reuse it, instead of keeping 1 copy for every time it shows up on a web page, well... That can sometimes be hard to fix because of the architecture of the software (software is so big and complicated these days that, if there's not a way to fix something within the object model being used, it's sometimes better to just leave it unfixed than to hack in an exception that makes the whole huge machine more fragile and complicated, especially in the case of something that people shouldn't be doing anyways-- like having ten one hundred frame stomping goats on one page). Or it can even be an intentional decision for some weird ass political reason-- some complete sniveling pencil necked geek is probably proud of how beautiful his rendering pipeline is architected and doesn't want to cache decoded GIFs because that would break the pretty lines of flow.

Yeah, I bet it's related to memory. But who knows. Computers are complicated.