Closed RSDuck closed 7 years ago
I've put some further research into it and created a version of vscode-nim which uses the "old" socket based protocol instead of epc and it's actually much faster(the code is mostly from an old version of vscode-nim which used this protocol): https://github.com/RSDuck/vscode-nim/tree/oldsockets
vs:
EDIT: the question is now, what would be the best option? Switching back to tab based protocol or doing something to improve the performance of the EPC/RPC library(maybe it's the SExp library which performance is that bad)?
The better option will be improve EPC because this protocol returns lenght of message that guarantee that we read full message
already fixed with #48, I forgot to close it
It looks like that something(probably the RPC library) eats up a lot of time. At first I thought the problem is related to nimsuggest but it isn't(https://github.com/nim-lang/nimsuggest/issues/55)
In all tests I used the following file: y.nim
I added the following code to measure the performance within the extension:
I moved the cursor into the third line of y.nim and it took it outputted a request time of around 7 seconds.
The I tried the following test program(it needs nimsuggest to be started with the arguments --port:2811 y.nim):
And it outputted always something like this:
So as you can see it isn't nimsuggests fault. I'm thinking the problem is related to elrpc but I'm not sure about this.