[BUGFIX] Improve performance of extension scanner