dart-sdk/sdk
Alexander Markov d0052c1b31 [dart:_http] Fix potentially large List<int> allocation in _WebSocketPerMessageDeflate.processIncomingMessage
processIncomingMessage() was creating List<int> to hold uncompressed bytes,
which is very wastefull if size of the message is large (spending a word
for each byte).

Changed processIncomingMessage() to use BytesBuilder for uncompressed bytes.

This fixes flaky out of memory failure on service/get_vm_timeline_rpc_test with
bytecode in dartk-optcounter-linux-release-ia32 configuration. In that test size of
uncompressed message exceeded 130MB, causing 1GB memory allocation (512MB List
was expanded).

Change-Id: Ic5a78a13bd431f5ad97496907a84a3f7ba01c1fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117121
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 17:07:16 +00:00
..
bin Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable."" 2019-09-05 14:46:43 +00:00
lib [dart:_http] Fix potentially large List<int> allocation in _WebSocketPerMessageDeflate.processIncomingMessage 2019-09-13 17:07:16 +00:00
api_readme.md Update API homepage to link to dart.dev, not dartlang.org 2019-05-21 02:51:59 +00:00
BUILD.gn Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable."" 2019-09-05 14:46:43 +00:00