File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 8
8
"strings"
9
9
"time"
10
10
11
+ "github.com/microsoft/typescript-go/internal/core"
11
12
"github.com/microsoft/typescript-go/internal/lsp/lsproto"
12
13
"github.com/microsoft/typescript-go/internal/tspath"
13
14
)
@@ -101,8 +102,16 @@ func createResolutionLookupGlobMapper(host ProjectHost) func(data map[tspath.Pat
101
102
102
103
// dir -> recursive
103
104
globSet := make (map [string ]bool )
105
+ var seenDirs core.Set [string ]
104
106
105
107
for path , fileName := range data {
108
+ // Assuming all of the input paths are filenames, we can avoid
109
+ // duplicate work by only taking one file per dir, since their outputs
110
+ // will always be the same.
111
+ if ! seenDirs .AddIfAbsent (tspath .GetDirectoryPath (string (path ))) {
112
+ continue
113
+ }
114
+
106
115
w := getDirectoryToWatchFailedLookupLocation (
107
116
fileName ,
108
117
path ,
You can’t perform that action at this time.
0 commit comments