Fix performance issue rescanning every file change