improving performance when same module is loaded multiple times within a single thread