speed up add_moduleinfo, remove unnecessary queries