-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[plugin] fetching tasks is slow for big multi-root workspaces #7672
Comments
This comment has been minimized.
This comment has been minimized.
I was able to reproduce it with a bit of customizations JLab project:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"problemMatcher": [
"$tsc"
]
}
]
}
{
"folders": [
{
"path": "file:///workspace/jupyterlab"
},
{
"path": "file:///workspace/jupyterlab/dev_mode"
},
{
"path": "file:///workspace/jupyterlab/examples"
},
{
"path": "file:///workspace/jupyterlab/packages"
},
{
"path": "file:///workspace/jupyterlab/packages/services/examples/node"
},
{
"path": "file:///workspace/jupyterlab/packages/services/examples/browser"
},
{
"path": "file:///workspace/jupyterlab/packages/services/examples/typescript-browser-with-output"
},
{
"path": "file:///workspace/jupyterlab/buildutils"
},
{
"path": "file:///workspace/jupyterlab/buildutils/template"
},
{
"path": "file:///workspace/jupyterlab/buildutils/buildutils/test-template"
},
{
"path": "file:///workspace/jupyterlab/tests"
},
{
"path": "file:///workspace/jupyterlab/testutils"
},
{
"path": "file:///workspace/jupyterlab/jupyterlab/tests/mock_packages/extension"
}
],
"settings": {}
}
The profiling snapshot: https://drive.google.com/file/d/1pyCUMaGm-7scjJ-KMqHmfm2gINs6BdVx/view?usp=sharing There are 2 hot spots:
|
|
@elaihau Do you know how to test whether we need to call |
VS Code does not remove duplicate, it returns all tasks: I does not look like Tested with https://github.com/akosyakov/vscode-fetch-tasks-test and adding following {
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
} |
If we don't want to
I took a look at the
The current |
I've simplified it in aba5392 Could you have a look there? But it only to make it faster it does not make sure that it aligned with VS Code extensions' expectations.
I've opened #7681 for VS Code compatibility. Ideally results should be aligned as much as possible. But you can also try to investigate whether it's worth an effort, i.e. whether it can affect some extensions, users and how many. Let's have a look at it separate from performance optimisations. |
@akosyakov I tried it in vscode with an extension. However, in vscode, same tasks, or tasks with same labels, can be contributed by different providers multiple times. Do you want me to create an issue for it? |
validateSchema
should be computed once and cachedbut I am not sure that we need it at all, does VS Code validate task configs?
We removed such logic already for preferences, since it is slow and VS Code does not care about.
cc @elaihau @RomanNikitenko
The text was updated successfully, but these errors were encountered: