diff options
author | tapted <tapted@chromium.org> | 2015-05-04 00:20:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-04 07:20:35 +0000 |
commit | 05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2 (patch) | |
tree | 0e2e8277a0d0630a05e2191bd4d59d0f73202dbc /components/webp_transcode | |
parent | 314f1bd27665f7207dc1b04e387650cbdaf5f026 (diff) | |
download | chromium_src-05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2.zip chromium_src-05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2.tar.gz chromium_src-05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2.tar.bz2 |
[Mac/Cleanup] Trim down Foundation.h and ApplicationServices.h includes
Foundation.h is about 100k lines of preprocessed source.
ApplicationServices is one of the many things it includes, and it is
also large (80k lines) and appears in ui/gfx/geometry headers that are
used in many places that don't care specifically about mac.
This CL avoids including Foundation.h or ApplicationServices.h from
commonly-used header files. The particular focus is on header files
typically included from other header files (versus headers most commonly
included only from .cc or .mm files).
The geometry headers get a forward-declare and fewer inline functions.
rect.h on Mac was already de-inlined, so this makes size and point
consistent with that. It also makes Mac more consistent with the
approach on Windows for native geometry types.
The main Foundation.h contributor was scoped_nsobject.h. It switches
from <Foundation/Foundation.h> (100k lines) to <Foundation/NSObject.h>
(1.5k lines). Note that even NSObject.h is not strictly needed:
<objc/objc.h> for the declaration of "nil" is sufficient, but forces
users of scoped_nsobject to make their own decision of the header to
include.
This results in a 36m20s [+/- 1s] CPU time improvement to compile times
on Mac (or a measured 1m33s [+/- 2s] real/wall time improvement on a
recent macpro). Error range gives the interval wherein lies the true
mean with a 90% confidence (6 measurements each).
There's a also a reduction in name collisions. E.g. kSmallIconSize which
is a global symbol in both Chrome and CoreServices, and is what actually
set me down this path in the first place.
BUG=None
TBR=sdefresne@chromium.org,stuartmorgan@chromium.org,thestig@chromium.org
Review URL: https://codereview.chromium.org/1092033006
Cr-Commit-Position: refs/heads/master@{#328102}
Diffstat (limited to 'components/webp_transcode')
-rw-r--r-- | components/webp_transcode/webp_decoder.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/webp_transcode/webp_decoder.h b/components/webp_transcode/webp_decoder.h index 64126c2..ab2509e 100644 --- a/components/webp_transcode/webp_decoder.h +++ b/components/webp_transcode/webp_decoder.h @@ -5,6 +5,8 @@ #ifndef COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_ #define COMPONENTS_WEBP_TRANSCODE_WEBP_DECODER_H_ +#import <Foundation/Foundation.h> + #include "base/mac/scoped_nsobject.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" |