Summary:
When two or more animals collide (or are touching) in water, and the player moves more than 16 blocks away from them, there is a massive FPS drop. However, when the sound is off this issue does not occur.
How to Reproduce:
Make sure sound is set above 0%! Dig a 1x1 hole 2 deep. Place water in the bottom. Spawn two or more chickens (more will make it worse) in the hole. Walk 16-18 blocks away, while observing FPS and sound CPU usage on the debug chart.
Attached is a video of reproducing the bug.
Related issues
is duplicated by
Attachments
Comments

confirmed, dropped about 15-30 fps
Confirmed, having the same issue. impossible to stay near automated chicken farms....
I've updated the title, as the problem is caused by all mobs, not just animals.
After lots of messing around with this bug in MCP I eventually fixed it somewhat, although it is more than a workaround than a fix. I've attached the class files for 1.4.2 for those who are just as annoyed about this bug as I am. Install just like any mod: put .class files in minecraft.jar using 7zip or similar and remove the META-INF folder.
For Mojang:
The lag is caused by sndSystem.setListenerPosition in SoundManager.setListener when a lot of sounds go out of range at the same time; it is in fact not limited to the splashing sound, that one just gets played obscenely often in farms so it is most noticible with that sound. I couldn't check beyond SoundManager.setListener because MCP does not decompile paulscode (the actual sound system), but I assume it has something to do with sounds running at zero or negative volume or it trying to flush the buffer for a sound while trying to stop it or something.
The fix/workaround in the associated class files is as follows:
Maintain a hash map of all running sounds with their associated position (the actual sound system probably does this already but due to aforementioned reasons I could not access these classes easily).
Loop over them in setListener just before calling sndSystem.setListenerPosition.
Call sndSystem.stop for all sounds which are about to go out of range and remove them from the hash map.
P.S. I have never used this bug reporting system before, if I'm doing something wrong or am not supposed to upload the fix like this I do sincerely apologize.
I managed to inject the fix into the actual sound system now, it should now work for pretty much any minecraft release because the soundsystem code is not obfuscated and doesn't change every release. I tested it for 1.4.2 and 1.4.3pre at least. As usual, copy the contents into minecraft.jar and remove META-INF.
gj Jeroen! Let's hope a Dev sees your fix! 🙂
I'm sure this is also the cause of MC-46. The workaround I provided there also fixes this.
This is a notorious issue with rain, but it's also caused ocassionally by other sounds. I worked around it by deleting the OpenAL files in bin/natives and installing them in my OS. Never had sound lag problems again.
I followed the steps from here: http://www.minecraftforum.net/topic/892045-sound-lagstutter-fix/
This sounds exactly like my issue. In my case it's a chicken coop where the chickens are in water that forces them into a hole where eggs are dropped. Any time I walk away from the coop I get a massive slowdown. I'll try the OpenAL files but ultimately I think a code change is what is needed. Jeroen, I appreciate your work and I hope it is used by the devs. Seems it would be a quick fix if they simply adopt your code.
EDIT
OpenAL did the trick - I have a blissfully, consistent framerate. That said, I would rather have a fix that allows the use of the 64-bit OpenAL drivers (and one that addresses the core issue).
Confirmed for 1.4.7 AND that the fixes suggested in the comments solve the problem.
Lag/stutter is more noticeable on weaker systems.
Mojang please review this as a priority as it hinders game-play significantly on some systems.

Still exists in 13w03a.
Glad I'm not the only person that's noticed this problem, it was an issue with chicken farms on an SMP server I ran a while back too.

Still exists in 13w04a.

Still exists in 13w06a.

Still exists in 13w07a.

Still exists in 13w09b.
EDIT: I meant b.

Still happens in 13w10a.

Is this still a concern in the current Minecraft version 1.6.2 / Launcher version 1.1.2 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
I can't seem to replicate this anymore... Tried chickens in a water pit, flying above rain, and a couple other things which induced the problem previously. Seems like this is fixed! I'm surprised, though... I still get some random fps drops in the nether...

Ok, thanks.
Josiah: Nether-lag is usually because of either the many lava and/or sound.
Believe it or not, but depending on how good your soundcard is, MC sound can lag you badly, mostly mobs.
On my old desktop computer the Ghasts (their yelling and the crashes of their fireballs) crashed my sound several times, and I also lagged because of it.
Kind regards,
Meri
[PS: @Kumasasa - reminds me: I still have to update my own Issue, sorry, forgot it due to real life stuff >.<]