Extension host freezes for a long time on startup in large client-side workspaces (workspace indexing queues every file)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript, vscode
Línea de trabajo
Start with src/utils/documentIndex.ts at indexWorkspaceFolder and src/utils/index.ts at Semaphore.release; the issue links to the relevant lines. Trace how workspace files are discovered and queued, then inspect how importability checks handle non-ObjectScript files. Reproduce with a large workspace and compare startup responsiveness; done means indexing no longer causes a long extension host freeze.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
In a project workspace folder with about 300,000 files, of which only a small part are ObjectScript classes and routines, the extension host becomes unresponsive for more than a minute after every start or window reload. During that time no completions or hovers work for any extension. VS Code attributes the freeze to vscode-objectscript extension (about 90% of the sampled time):
[info] [Window] Extension host (LocalProcess pid: 27936) is unresponsive.
[warning] [Window] UNRESPONSIVE extension host: 'intersystems-community.vscode-objectscript' took 90.05% of 4508.89ms
[info] [Window] Extension host (LocalProcess pid: 27936) is responsive. <- ~65s later
Cause (v3.8.7, same on master)
indexWorkspaceFolder(documentIndex.ts#L192) runsfindFiles("{**/*}")and queues one rate-limited task per file. That is hundreds of thousands of tasks.Semaphore.release()(index.ts#L1185) dequeues withArray.prototype.shift(), which is O(n) on an array this large. Draining the queue is therefore O(n²), and most of the CPU time goes intorelease.- Every task, including those for non-ObjectScript files, calls
isImportableLocalFile. ThroughcspAppsForUriandotherDocExtsForUrithat constructs twoAtelierAPIobjects and reads the configuration, once per file.
I made sure that excluding the non-ObjectScript code folders via files.exclude removes the freeze.
Suggestions for improving behavior
- Is it possible to filter files by extension before queueing, or pass a narrower glob to
findFiles? - Alternatively, adding a setting to the extension that allows for listing project subdirectories containing ObjectScript code (or, conversely, those that do not contain ObjectScript code) might also help solve the problem.
Environment
vscode-objectscript 3.8.7, VS Code 1.145.2, Windows 11
(actually, the problem existed in earlier versions as well, I’ve only now managed to figure out what was going on)
- Lenguaje dominante
- TypeScript
- Estrellas
- 117
- Forks
- 59
- Merge medio
- 2 d 8 min
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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.
Más de intersystems-community/vscode-objectscript
-
Folder import and compile reports missing User.* classes although compiling the open class succeedsPosiblemente ocupada @isc-bsaviano la tomó hace 1 día. Abiertobug
intersystems-community/vscode-objectscript#1900 · 3 comentarios · 1 reacción · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Extesion change file encoding after save.Posiblemente ocupada @isc-bsaviano la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
intersystems-community/vscode-objectscript#1897 · 5 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Cant' compileAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
intersystems-community/vscode-objectscript#1889 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Workspace folder name can override objectscript.conn.server when it matches a server nameQuizá libre de nuevo @isc-bsaviano la tomó hace 31 días y no hay ningún pull request abierto. Abiertobug
intersystems-community/vscode-objectscript#1885 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
upstream
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
intersystems-community/vscode-objectscript#1876 · 18 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de intersystems-community/vscode-objectscript
Issues similares
-
Add: Shop On TV SDAbiertocheck:passed streams:add
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
bug implicit-state
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
book-layout.spec fails when the similar-books rail holds other projects' booksPosiblemente ocupada @praetorianer777 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
praetorianer777/GoTome#373 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Tencent/tdesign-react#4465 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:cards enhancement ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
fil-donadoni/tolaria#8883 ·
Los mantenedores suelen responder en 1 día