mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-05 21:48:49 +01:00
09de4b8349
Previously, we would compact the buffer (moving unread data to the start of the buffer) as follows: - after processing a message, if there are zero unread bytes, just reset the indices for first and last unread byte to zero - else, if at least 1/8th of the buffer is used, copy remaining data to the beginning of the buffer The second option is never actually necessary, as before inserting new data into the array, we already check if there's enough free space, and compact the buffer first if necessary. So we've been doing a lot of copies that weren't actually needed. Let's not do that any more. |
||
---|---|---|
.. | ||
decoders | ||
input | ||
util | ||
base64.js | ||
des.js | ||
display.js | ||
encodings.js | ||
inflator.js | ||
rfb.js | ||
websock.js |