commit | 1ede155664606236fe8958b0a4c7e695bb378c39 | [log] [tgz] |
---|---|---|
author | Mikhail Istomin <mistomin@yandex-team.ru> | Wed May 16 17:40:24 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed May 16 17:40:24 2018 |
tree | 334204159e2c29e7f4beef945ce82e1677c1a16b | |
parent | 557d8e0e335ab7234fa1671bd70704659b675efa [diff] |
Optimize ReadFileToStringWithMaxSize function GetFileSize can be used to estimate buffer size if file size is available. So use it as a hint for buffer size for file reading. Also avoid latest fread syscall in reading loop using feof. Bug: 821262 Change-Id: I7dc30483a2f95d4da2c0d3cb0049941d2634a281 Reviewed-on: https://chromium-review.googlesource.com/958861 Commit-Queue: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#559168}
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 .