microsoft / microsoft/vscode-cpptools
Performance & functionality with real world mid-large C++ codebases
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.2k
- Forks
- 1.7k
- Merge medio
- 14 h 46 min
- PR fusionados (30 d)
- 61
Descripción
Hello!
EDIT: Forget about it. I have just seen this https://github.com/microsoft/vscode-cpptools/blob/main/RuntimeLicenses/cpptools-srv-LICENSE.txt
No plans to make it public?
CONTEXT
Since we transitioned in my company from QtCreator to VSCode for C++ development in our WSL environment, I have faced a lot of complains in different areas regarding the overall status of it. We have mid-large-huge C++ codebases and that could arise different and undetected issues than toy projects or small ones.
A recurring complain is just that it's really slow. Hovering, finding references, go to definitions, debugging, indexing could take ages; sometimes they just did not work, sometimes it just crashed with the infamous Remote unexpected issue.
For now a lot of devs have been using clangd extension as replacement with a range of success; faced other issues but at least works generally better for the codebases.
MOTIVATION
I decided to give it a more in-depth look in my free time to help you if possible to identify where the problems are coming, get some numbers, profile the application and see where it could be improved. This is linked with this initiative affecting the CMakeTools extension also, which faces the same problem of poor performance with our codebases; a quick profiling gave us hints where to focus and how to.
Same applies here: I'm not a Typescript developer, but at least I hope to get more insights of the performance problems and overall experience.
CURRENT STATUS
Debugging the extension and enabling the Profiling to check why the InteliSensee takes so much time; the hovering / FindAll references &c.
However, it's not identifying any time-consuming function because they seem to be residing in other node_modules, so I got a cold shower in my expectations:
Naive example in hoverProvider.ts
console.time("hover")
let hoverResult: vscode.Hover;
try {
hoverResult = await this.client.languageClient.sendRequest(HoverRequest, params, token);
} catch (e: any) {
if (e instanceof ResponseError && (e.code === RequestCancelled || e.code === ServerCancelled)) {
throw new vscode.CancellationError();
}
throw e;
}
if (token.isCancellationRequested) {
throw new vscode.CancellationError();
}
console.timeEnd("hover")
So perhaps some of the complains I've receiving is not because the extension itself, but waiting for the response of other code modules. For this case, where is actually the code processing the request? If it's not the extension, I'm afraid we'll reach a dead end; I guess it's the Language Server cpp-srv the responsible one, but the code not public anywhere, right?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con hoverProvider.ts y la ruta de profiling alrededor de languageClient.sendRequest para determinar si el retraso está en la extensión o en el language server no público. Se consideraría terminado al identificar un cuello de botella reproducible y un componente claramente responsable, pero el issue no proporciona ningún caso específico que falle ni un cambio objetivo.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- cpp, typescript
- Área
- performance
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 20/100