commit | 8e8c6250ee1cf99df021a41d9a2dc8f49e947722 | [log] [tgz] |
---|---|---|
author | Benoît Lizé <lizeb@chromium.org> | Wed Nov 21 13:14:20 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Nov 21 13:14:20 2018 |
tree | a618fe85505a74df96093c481a4da8732e9eca1b | |
parent | a9a27f6eb8b2daaa495f2f38499a8102c4b63e05 [diff] |
blink/bindings: Keep compressed ParkableStrings when unparking, and reuse it. When a ParkableString is unparked, keep the compressed data around, allowing to drop the uncompressed data at no cost later. As decompression is much (>10x) cheaper than compression and compressed data smaller, this is usually a good tradeoff. This also allows to recover memory when a string is unparked once, and its content is not touched again soon. Concretely, we introduce: - "synchronous parking" when parking is merely dropping the decompressed representation. - "synchronous only" string parking in ParkableStringManager - Drop all parkable strings when receiving a OnPurgeMemory() notification. Also, improve and simplify testing, with fewer "friend" function and tighter compression test. Bug: 877044 Change-Id: I4b66ca5ddc67b2a6e49bfd1790e1788870642b04 Reviewed-on: https://chromium-review.googlesource.com/c/1329975 Reviewed-by: Benoit L <lizeb@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Benoit L <lizeb@chromium.org> Cr-Commit-Position: refs/heads/master@{#610024}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .