Shared hosting just isn't reliable. It could be his code, but if the slow performance times aren't constant, it's probably the host. You're sharing a web server, database, email, and etc with at least 50 other people (these days, you're lucky if it's just that) and it's all on the same computer. Each scripting language as many ./configure options enabled as they can, so it will fit the needs of the masses.
I'm not sure if you're attached to the ease of use of shared hosting, but it is advantageous to get a VPS and compile everything with just the options you need. I'm a happy liode customer, and many others here are as well.