eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
61 stars 54 forks source link

perf: improve StreamProxyInputStream #1068

Closed sebthom closed 3 weeks ago

sebthom commented 3 weeks ago

the current implementation is sub optimal as it creates a new queue element for each byte read from the process. the new implementation queues arrays of bytes instead, resulting in fewer queue elements and in avoiding byte -> Byte -> byte conversions. this also reduces GC pressure in the Eclipse IDE process.

I also implemented read(final byte[] buf, final int off, final int len) which improves bulk read performance.

mickaelistria commented 3 weeks ago

Thank you for this interesting improvement!