Having entered another item about hostiles spawning on leaves and mushroom trees (in any biome) that was marked as dupe of this one, I can also say that it's not just spiders, but also, at least, zombs and skeletons. Spiders seem much more prevalent in the spawning on leaves, though. I'm currently at 1.2.3 (.6? (it only shows 1.2.3 on title screen)) on xbox.
Curses, I did search, but used mobs, hostile and leaves for search and only found items dealing with mobs spawning IN leaves and getting stuck.
In regards to the other item his is more than spiders and more than mushroom biomes, though, as I've seen skeletons and zombs on top of trees as well. I will update that item as such and you can close this as a dupe if appropriate.
Adding to this, I've had horrid issues with this as well, but it's only with cows when I am holding wheat and within 10 or 12 blocks of a large (20+) group of them. I just ran a test with setting up a pen for sheep, I currently have 30 sheep in there and I do not experience any lag at all.
The lag that I've experienced has been in both a single player world and a realm.
If I may respond to @Thomas above, stairs do not work for them losing interest.
In reality I see two bugs here. First, any change in elevation, up or down, by 1 block or more will cause a following animal to lose interest for 4 or 5 seconds. This happens inside or outside of fenced areas.
Second, if following, animals have a very difficult time jumping up a single block. It takes 3 or 4 tries to go up one block before they succeed, and this coupled with them losing interest for 4 seconds with each attempt at jumping, gets frustrating.
Adding more to what I believe is the same issue. For me, I cannot place blocks directly beneath me when crouched. I'm on ver 1.2.5.
Replication:
Crouch/sneak, hold jump button, hold placement button. No block placed.
If standing normally (not crouched), holding jump and holding placement works fine for me. If crouched and repeatedly pressing the placement button while holding jump, I can get blocks to place, I just cannot hold the placement button.