Performance optimization for detection of modified submodules