Improve completion and scan folders only on first call to improve perfor...

...mance