• caseq's avatar
    Re-land issue 750183008 (Parallelize trace messages serialization) · 61b95998
    caseq authored
    This re-lands https://codereview.chromium.org/750183008 (originally
    by loislo@) with the output chunk size reduced down from 10M to 100K
    (close to what it used to be originally). The reason for telemetry
    failures of original change on Windows was the bug in websocket-client
    (https://github.com/liris/websocket-client/issues/163) that caused
    it to fragment Python heap when receiving a large frame.
    
    Original issue description:
    Move serialization into a worker thread. As a result
    IO thread will be able to send messages to the browser.
    
    The original implementation did serialization on IO thread
    and was not able to send the messages because ipc had
    is_blocked_on_write_ = true and had no chance to check
    the actual state of the channel. So the messages were
    collected in output_queue. Also the messages could be quite
    big and could block the IO thread for a long time.
    
    BUG=463572
    TBR=dsinclair
    (as he already l-g-t-m-d the original patch)
    
    Review URL: https://codereview.chromium.org/1035783002
    
    Cr-Commit-Position: refs/heads/master@{#322391}
    61b95998
tracing_controller_impl.cc 29.8 KB