also fwiw, sourcekit-lsp gets initialized upon opening a swift file.
I've monitored the db size, and it stops at ~3.1G while the index store has ~14G.
However, as I open more random swift files, the indexstore-db seems to increase in size ~0.1 to ~0.2G. Is this an expected behavior? I was under the impression that it scans through the indexstore to build out the db, and that technically the db shouldn't keep getting bigger if nothing changes in the index store. I've seen the index store-db size increase up to 4.5 (and continue to increase randomly) for example.
FWIW, me determining it has finished is if I don't see a change in size of the db for a bit, so this may not be the most accurate method of doing so. Please advise if there is a better way to do this.
I've attached another sample of the perf
captured, seems to be pretty consistent in terms of cpu usage and the symbol matching.
Also fwiw, noticed something like this today
$ perf record -F 99 -p 1721559 -g
WARNING: Ignored open failure for pid 1774882
WARNING: Ignored open failure for pid 1774971
WARNING: Ignored open failure for pid 1775026
WARNING: Ignored open failure for pid 1775028
WARNING: Ignored open failure for pid 1775036
WARNING: Ignored open failure for pid 1775039
WARNING: Ignored open failure for pid 1775040
WARNING: Ignored open failure for pid 1775041
WARNING: Ignored open failure for pid 1775042
WARNING: Ignored open failure for pid 1775043
WARNING: Ignored open failure for pid 1775044
WARNING: Ignored open failure for pid 1775050
WARNING: Ignored open failure for pid 1775051
WARNING: Ignored open failure for pid 1775054
WARNING: Ignored open failure for pid 1775055
WARNING: Ignored open failure for pid 1775118
WARNING: Ignored open failure for pid 1775120
but I haven't been able to track down what those pids represent, as ps aux | grep <pid>
doesn't seem to return what processes those are.
Edit: I've also noticed that the sourcekit-lsp PID had changed when I checked the machine later. I had done nothing with the machine up to this point, and index-db is now at 5.4 GB. I've checked to see if the sourcekit-lsp trace says anything, but nothing seems to indicate it had crashed (Notice the timestamps) so not sure why the pid would change?
[Trace - 2:10:54 PM] Received response 'textDocument/diagnostic - (116)' in 621ms.
Result: {
"items": [],
"kind": "full"
}
[Trace - 5:31:19 PM] Sending request 'textDocument/documentHighlight - (118)'.
Params: {
"textDocument": {
"uri": "file:some/file/here"
},
"position": {
"line": 44,
"character": 29
}
}
This is the perf report
at this point
Edit 2: This is the state at 6.6 gb of indexstore-db, but it took a very long time to get to this point (at least 3 hrs + it seems) I guess I was wrong initially about the size being ~3.1G, and that it was still in the process of building the db without even without me opening up the swift files.
Currently this is the stagnant state, the db doesnt seem to increase in size anymore. Is the sourcekit-lsp cpu usage normal at this point?