You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, sorry. Taking this back. The issue appears to be that initializing sourcekit-lsp takes about 3 seconds when opening sourcekit-lsp and opening the first document takes another 2 seconds (SwiftPM is doing something around dependency loading). Attaching a log of sourcekit-lsp serve initialization.
Possible solutions here could include:
Figure out why initializing the SwiftPMWorkspace takes 3 seconds during initialization
Not wait for the initialization of SwiftPMWorkspace to finish before returning from the InitializeRequest
Figure out why we are doing package loading during the textDocument/didOpen notification
Time out during build settings retrieval, open file with fallback build settings and re-open it when real build settings become available.
It could also be that this is competing for the build directory lock with package loading that is started by the Swift extension, which means that package initialization can’t start until that package resolve is done.
The text was updated successfully, but these errors were encountered:
Not sure if this is the same issue, but I've noticed what I believe to be a regression (on Windows) where initialization in a large compilation database project takes almost 3 minutes.
Received response 'initialize - (0)' in 166488ms
I haven't dug into this too deeply yet, if this issue is scoped just to SwiftPMWorkspace then my issue could be unrelated.
The time it takes here seems to scale with project size, initializing a HelloWorld CMake project took 7174ms.
I don’t think that’s related. The issue is about SwiftPMWorkspace doing work (like resolving package dependencies) and SourceKit-LSP shouldn’t get into that path if your project doesn’t have a Package.swift.
Oh, sorry. Taking this back. The issue appears to be that initializing sourcekit-lsp takes about 3 seconds when opening sourcekit-lsp and opening the first document takes another 2 seconds (SwiftPM is doing something around dependency loading). Attaching a log of sourcekit-lsp serve initialization.
Possible solutions here could include:
SwiftPMWorkspace
takes 3 seconds during initializationSwiftPMWorkspace
to finish before returning from theInitializeRequest
textDocument/didOpen
notificationIt could also be that this is competing for the build directory lock with package loading that is started by the Swift extension, which means that package initialization can’t start until that package resolve is done.
The text was updated successfully, but these errors were encountered: