Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Issue 9235053: Add a PartialPreReadImage function to file_util (on Windows). (Closed)

Created:
8 years, 11 months ago by Roger McFarlane (Chromium)
Modified:
5 years, 5 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, Evan Martin, darin (slow to review)
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Add partial pre-read functionality to browser startup (Windows). PartialPreReadImage has much the smae interface as PreReadImage except the bytes to read becomes a percentage to read and it reads a certain percentage of each section in the binary. Also adds some unittest coverage. BUG=chromium:98508 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=120371

Patch Set 1 #

Patch Set 2 : Fix some 'conversion may lose data' warnings #

Patch Set 3 : Export some functions for unit-testing #

Patch Set 4 : Use the pe_file interface instead of directly traversing the windows headers, add some DCHECKs #

Patch Set 5 : Remove some superfluous/redundant error handling #

Patch Set 6 : Fix a type conversion warning from the try bots #

Patch Set 7 : Initial CL for Review #

Total comments: 36

Patch Set 8 : Address feedback from siggi and chrisha #

Total comments: 8

Patch Set 9 : Address Robert's feedback and refactor as inspired by Chris #

Total comments: 4

Patch Set 10 : Use PathService and fix a typo #

Patch Set 11 : Enable partial pre-read experiment #

Total comments: 8

Patch Set 12 : Address Evan's comments #

Patch Set 13 : rebase to master #

Patch Set 14 : fix interaction between experiment and registry-forced pre-read settings #

Patch Set 15 : rebase #

Patch Set 16 : move image pre reader code to chrome/app #

Patch Set 17 : Update the unit and perf tests #

Patch Set 18 : tiny cleanup of includes and excess whitespace #

Patch Set 19 : Rebase #

Patch Set 20 : make image_pre_reader project windows only #

Total comments: 40

Patch Set 21 : De-conflate partial-pre-load change from base:file_util cleanup #

Patch Set 22 : Address feedback from Chris and Siggi #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+694 lines, -22 lines) Patch
M chrome/app/client_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +45 lines, -11 lines 0 comments Download
A chrome/app/image_pre_reader_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/app/image_pre_reader_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +420 lines, -0 lines 1 comment Download
M chrome/chrome_exe.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +12 lines, -0 lines 0 comments Download
M chrome_frame/chrome_frame.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M chrome_frame/test/perf/chrome_frame_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +142 lines, -11 lines 0 comments Download

Messages

Total messages: 33 (1 generated)
Roger McFarlane (Google)
PTAL. This CL introduces functions for partial pre-read. A subsequent CL will integrate them for ...
8 years, 11 months ago (2012-01-26 17:09:25 UTC) #1
chrisha
Some comments and questions. https://chromiumcodereview.appspot.com/9235053/diff/6006/base/file_util_unittest.cc File base/file_util_unittest.cc (right): https://chromiumcodereview.appspot.com/9235053/diff/6006/base/file_util_unittest.cc#newcode42 base/file_util_unittest.cc:42: size_t percentage, indent - 1 ...
8 years, 11 months ago (2012-01-26 18:23:09 UTC) #2
Sigurður Ásgeirsson
Nice. https://chromiumcodereview.appspot.com/9235053/diff/6006/base/file_util.h File base/file_util.h (right): https://chromiumcodereview.appspot.com/9235053/diff/6006/base/file_util.h#newcode620 base/file_util.h:620: bool BASE_EXPORT PartialPreReadImage(const wchar_t* file_path, A bit of ...
8 years, 11 months ago (2012-01-26 18:59:20 UTC) #3
robertshield
https://chromiumcodereview.appspot.com/9235053/diff/7007/base/file_util.h File base/file_util.h (right): https://chromiumcodereview.appspot.com/9235053/diff/7007/base/file_util.h#newcode629 base/file_util.h:629: size_t percentage, does percentage need to be a size_t? ...
8 years, 11 months ago (2012-01-26 22:43:44 UTC) #4
Roger McFarlane (Google)
Thanks for the great feedback! PTA(nother)L I've refactored a bit (moved some code into helper ...
8 years, 11 months ago (2012-01-27 05:24:08 UTC) #5
Roger McFarlane (Google)
+jar (from OWNERS) @jar... We're looking to play with partial pre-read for chromium startup. Here's ...
8 years, 11 months ago (2012-01-27 05:33:58 UTC) #6
Sigurður Ásgeirsson
lgtm https://chromiumcodereview.appspot.com/9235053/diff/12007/base/file_util_unittest.cc File base/file_util_unittest.cc (right): https://chromiumcodereview.appspot.com/9235053/diff/12007/base/file_util_unittest.cc#newcode675 base/file_util_unittest.cc:675: // TODO(rogerm): Add checks to the *PreREadImage* tests ...
8 years, 11 months ago (2012-01-27 14:18:31 UTC) #7
Roger McFarlane (Google)
Thanks! https://chromiumcodereview.appspot.com/9235053/diff/12007/base/file_util_unittest.cc File base/file_util_unittest.cc (right): https://chromiumcodereview.appspot.com/9235053/diff/12007/base/file_util_unittest.cc#newcode675 base/file_util_unittest.cc:675: // TODO(rogerm): Add checks to the *PreREadImage* tests ...
8 years, 11 months ago (2012-01-27 14:53:23 UTC) #8
chrisha
lgtm
8 years, 11 months ago (2012-01-27 14:55:13 UTC) #9
robertshield
lgtm
8 years, 11 months ago (2012-01-27 18:53:52 UTC) #10
Roger McFarlane (Google)
Thanks. I've added the code to enable the experiment. Please take a look at client_util.cc. ...
8 years, 11 months ago (2012-01-27 19:15:00 UTC) #11
chrisha
lgtm
8 years, 11 months ago (2012-01-27 19:20:51 UTC) #12
Sigurður Ásgeirsson
lgtm
8 years, 11 months ago (2012-01-27 19:43:28 UTC) #13
Evan Martin
Does this belong in base? Consider that base is code that is shared by all ...
8 years, 11 months ago (2012-01-27 20:13:58 UTC) #14
Roger McFarlane (Google)
Thanks. Yeah, it would seem that base/file_util might not be the best place for this ...
8 years, 11 months ago (2012-01-27 21:25:54 UTC) #15
Evan Martin
On 2012/01/27 21:25:54, Roger McFarlane (Google) wrote: > We (the syzyty team) have some ideas ...
8 years, 11 months ago (2012-01-27 21:39:22 UTC) #16
Roger McFarlane (Google)
maybe in chrome/app/client_util_win.* ? Siggi/Robert... your thoughts?
8 years, 11 months ago (2012-01-27 21:46:53 UTC) #17
robertshield
On 2012/01/27 21:46:53, Roger McFarlane (Google) wrote: > maybe in chrome/app/client_util_win.* ? > > Siggi/Robert... ...
8 years, 11 months ago (2012-01-27 22:19:41 UTC) #18
Roger McFarlane (Google)
On 2012/01/27 22:19:41, robertshield wrote: > On 2012/01/27 21:46:53, Roger McFarlane (Google) wrote: > > ...
8 years, 11 months ago (2012-01-27 23:02:11 UTC) #19
darin (slow to review)
I agree with Evan. At the very least, this doesn't belong in file_util.h. That is ...
8 years, 11 months ago (2012-01-28 00:53:54 UTC) #20
darin (slow to review)
On 2012/01/27 22:19:41, robertshield wrote: > On 2012/01/27 21:46:53, Roger McFarlane (Google) wrote: > > ...
8 years, 11 months ago (2012-01-28 00:55:12 UTC) #21
darin (slow to review)
> SGTM. That said, can I punt on moving the files 'til after the 18 ...
8 years, 11 months ago (2012-01-28 00:58:00 UTC) #22
Roger McFarlane (Google)
On 2012/01/28 00:58:00, darin wrote: > > SGTM. That said, can I punt on moving ...
8 years, 11 months ago (2012-01-28 02:03:58 UTC) #23
Roger McFarlane (Chromium)
Some lab results and accompanying discussion can be found here. https://goto.google.com/syzygy-partial-pre-read-experiment
8 years, 10 months ago (2012-02-02 20:31:54 UTC) #24
Roger McFarlane (Chromium)
Renamed the issue... From: Add a PartialPreReadImage function to file_util (on Windows). To: Add partial ...
8 years, 10 months ago (2012-02-03 16:09:36 UTC) #25
chrisha
http://codereview.chromium.org/9235053/diff/26020/chrome/app/client_util.cc File chrome/app/client_util.cc (right): http://codereview.chromium.org/9235053/diff/26020/chrome/app/client_util.cc#newcode216 chrome/app/client_util.cc:216: key.ReadValueDW(L"PreReadPercentage", &pre_read_percentage); ubernit: Keep these in alphabetic order? http://codereview.chromium.org/9235053/diff/26020/chrome/app/client_util.cc#newcode255 ...
8 years, 10 months ago (2012-02-03 16:31:08 UTC) #26
Sigurður Ásgeirsson
I suggest committing the cleanup of the files in base as a separate CL. We ...
8 years, 10 months ago (2012-02-03 16:36:39 UTC) #27
Roger McFarlane (Chromium)
Thanks. I've pulled out the base/file_util cleanup to another CL (see http://codereview.chromium.org/9309083/) and address Chris ...
8 years, 10 months ago (2012-02-03 17:45:42 UTC) #28
Sigurður Ásgeirsson
lgtm
8 years, 10 months ago (2012-02-03 18:11:55 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rogerm@chromium.org/9235053/28018
8 years, 10 months ago (2012-02-03 18:21:57 UTC) #30
commit-bot: I haz the power
Change committed as 120371
8 years, 10 months ago (2012-02-03 19:55:12 UTC) #31
Nico
5 years, 5 months ago (2015-07-26 02:20:55 UTC) #33
Message was sent while issue was closed.
https://codereview.chromium.org/9235053/diff/28018/chrome/app/image_pre_reade...
File chrome/app/image_pre_reader_win.cc (right):

https://codereview.chromium.org/9235053/diff/28018/chrome/app/image_pre_reade...
chrome/app/image_pre_reader_win.cc:33:
min_header_buffer_size_at_least_as_big_as_the_dos_header);
fyi, COMPILE_ASSERTs don't have to be in functions:
https://codereview.chromium.org/1255073002/diff/1/chrome/app/image_pre_reader...

Powered by Google App Engine
This is Rietveld 408576698