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

Issue 1092033006: [Mac/Cleanup] Trim down Foundation.h and ApplicationServices.h includes (Closed)

Created:
5 years, 8 months ago by tapted
Modified:
5 years, 7 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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 Committed: https://crrev.com/05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2 Cr-Commit-Position: refs/heads/master@{#328102}

Patch Set 1 : Attack scoped_nsobject #

Patch Set 2 : Rollback non-headers #

Patch Set 3 : Use a forward declare #

Patch Set 4 : fix blit, cleanups, rendertext can wait #

Patch Set 5 : rebase (patch conflict in permission bubble cocoa) #

Patch Set 6 : fix ios, 10.6 #

Patch Set 7 : fix more ios #

Patch Set 8 : nit #

Patch Set 9 : include -> import #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -41 lines) Patch
M base/file_version_info_mac.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download
M base/mac/launch_services_util.h View 1 chunk +1 line, -1 line 0 comments Download
M base/mac/scoped_nsobject.h View 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/local_discovery/service_discovery_client_mac.h View 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_view_mac.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/permission_bubble_cocoa.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M components/webp_transcode/webp_decoder.h View 1 2 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/plugin/webplugin_proxy.h View 1 2 3 4 2 chunks +6 lines, -3 lines 0 comments Download
M ios/web/navigation/navigation_item_impl.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/net/cookie_notification_bridge.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M printing/printing_context_mac.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download
M printing/printing_context_mac.mm View 1 chunk +0 lines, -1 line 0 comments Download
M ui/accessibility/platform/ax_platform_node_mac.h View 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ui/gfx/blit.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M ui/gfx/geometry/point.h View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M ui/gfx/geometry/point.cc View 1 2 2 chunks +13 lines, -0 lines 0 comments Download
M ui/gfx/geometry/rect.h View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M ui/gfx/geometry/rect.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gfx/geometry/size.h View 1 2 3 chunks +3 lines, -7 lines 0 comments Download
M ui/gfx/geometry/size.cc View 1 2 2 chunks +20 lines, -7 lines 0 comments Download

Messages

Total messages: 24 (16 generated)
tapted
Hi Nico - please take a look for review, and OWNERS in base,chrome,ui. (the rest ...
5 years, 7 months ago (2015-05-04 05:34:02 UTC) #13
Nico
On 2015/05/04 05:34:02, tapted wrote: > Hi Nico - please take a look for review, ...
5 years, 7 months ago (2015-05-04 05:59:48 UTC) #14
tapted
+OWNERS TBR (just shuffling #includes) sdefresne: components/webp_transcode stuartmorgan: ios/web thestig: printing On 2015/05/04 05:59:48, Nico ...
5 years, 7 months ago (2015-05-04 06:24:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1092033006/310001
5 years, 7 months ago (2015-05-04 06:26:22 UTC) #20
commit-bot: I haz the power
Committed patchset #9 (id:310001)
5 years, 7 months ago (2015-05-04 07:20:21 UTC) #21
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/05d4a5b475777ebbf2cbab9f76a4e2fbe40773f2 Cr-Commit-Position: refs/heads/master@{#328102}
5 years, 7 months ago (2015-05-04 07:21:06 UTC) #22
sdefresne
lgtm
5 years, 7 months ago (2015-05-04 08:48:43 UTC) #23
stuartmorgan
5 years, 7 months ago (2015-05-04 13:55:13 UTC) #24
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698