in reply to pack, 1 pix gif, and mod_perl speed

The H85 is wrong. The count to H is a number of nybbles, not bytes. Your string is 170 characters long and each character represents a nybble so you should be using H170.

I would guess the reason it takes longer is because you told the browser you were going to send 85 characters but you only actually output 43. Pack created a buffer containing the encoding of the first 85 nybbles of your string and ignored the rest. The browser was waiting for the other 42 characters and didn't stop waiting until the session timed out and the socket was closed.

Your gif doesn't look that dynamic to me. Why not put it in a file?

--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';