Commit fbe837c8 authored by gabadie's avatar gabadie Committed by Commit bot

cachetool: Implement batch mode to speed-up cache processing.

Before, Sandwich was modifying local cache directories by issuing
cachetool commands sequentially. But it was painfully slow.

This CL implement the cachetool's batch mode that process sequence
of command received from the stdin and return the commands results
in the stdout. This way, Sandwich just have to launch cachetool once
in the background and push to its stdin commands to process.

On cache directories populated by big webpages such as cnn.com's
home page, the Sandwich cache processing for NoState-Prefetch
emulation was taking 491s when spawning one cachetool process
for each commands versus 3s with this new online mode.

BUG=582080

Review-Url: https://codereview.chromium.org/2114933002
Cr-Commit-Position: refs/heads/master@{#405157}
parent 1c20746e
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment