If you have to load metadata scripts every time, then there's not much pointing deferring the load...  Maybe I should have put the thumbnail cache in a separate file that can be loaded statically.