I've been on the lookout for something like this. I just clocked in all my Bash startup files at 4858 lines, so I sure could use it.
Yikes!
I hope it's helpful - the cutdown for me was from 1.5 to .1 seconds. If you run into trouble any feedback would be much appreciated :)