Closed yqrashawn closed 5 years ago
I can confirm this as well. It's easy to trigger with a directory with lots of files in it: typing /lib/
or /usr/lib/
works for me, for example.
It seems that the issue is that make-process
uses a 4096-byte buffer internally, so company-tabnine--process-filter
isn't necessarily called with the full JSON response from TabNine, which can be much longer than that. This is especially annoying because there are actually multiple errors, one for each 4096-byte chunk of the response, since of course each chunk fails to decode. There's some quite noticeable freezing in the UI when this happens, which I hope is due to the errors and not because emacs can't read and decode the response quickly enough...
I presume this could be fixed by something along the lines of having a (buffer-local?) variable into which company-tabnine--process-filter
accumulates what it sees, only calling company-tabnine--decode
once the terminating \n
character is encountered.
Is this an instance of https://nullprogram.com/blog/2018/01/17/ ?
Should be fixed in the latest commit.
message buffer