[fpc-pascal] BSON formatter

Ryan Joseph genericptr at gmail.com
Thu May 7 16:18:53 CEST 2020

> On May 7, 2020, at 9:11 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> At least partial updates to a file should be there.
> Sending the whole file at essentially every few keystrokes is just braindead...

That's still happening but it's Sublime Texts fault for a bad API. It is fixed in the current development branch though (ST4). 

The problem is workspace symbols. For my project there are 40k symbols (system SDKs I like to browse easily) which translates to 10MB of JSON text.

It's so stupid it makes my feel ill and I weep for my CPU. I'm going to submit an issue to Microsoft since they at least allow this on GitHub.

>> The amount of redundant information being sent around is ridiculous. Mainly, the spec gives no way for the client to cache results and refer to
>> them later in various requests.  We're literally sending around mega bytes
>> of data for no reason whatsoever, except lazy programmers I guess.
> Indeed.
> I was doing some tests in VS Code with omnipascal; The Omnipascal LSP server process takes 100% cpu.
> No surprises there....

I've been talking to the LSP people at ST and they tell me it's really common for servers to be written in JavaScript because it's easily supported within VSCode's architecture (which Electron I'm sure you know). They may have written the thing in JavaScript for all I know. That's a problem right there as far as performance is concerned.

	Ryan Joseph

More information about the fpc-pascal mailing list