move-ts icon indicating copy to clipboard operation
move-ts copied to clipboard

Repeatedly fires scan on multiple clicks

Open electrovir opened this issue 6 years ago • 0 comments

We've got a large code base, and the "scan" operation apparently takes a very long time the first time (2+ minutes, see logs below). At first I didn't know what was going on and triggered the "Move Typescript" command multiple times (from the right click menu). Then I opened the dev tools to see what was going on and eventually saw that all my triggers ended up finishing, opening the "Where would you like to move?" dialog over and over.

I'm guessing this simply needs a to track if a scan is already in progress and not trigger more scans in the meantime.

Here's the dev tools output with paths truncated:

[Extension Host] scan finished in 111292ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294
[Extension Host] scan finished in 277543ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294
[Extension Host] scan finished in 279089ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294
[Extension Host] scan finished in 278734ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294
[Extension Host] scan finished in 276190ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294
[Extension Host] scan finished in 261436ms (at vscode.workspace.findFiles.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:116:21))
workbench.main.js:294
[Extension Host] move-ts initialized (at scanAll.then.then (stringham.move-ts-1.11.3/out/src/index/referenceindexer.js:37:25))
workbench.main.js:294

electrovir avatar Feb 08 '19 18:02 electrovir