[webkit-dev] Why does Frame.h use mutable members instead of OwnPtr?
Eric Seidel
eric at webkit.org
Thu Jun 10 16:22:13 PDT 2010
Example. Use of a mutable member for AnimationController:
https://trac.webkit.org/browser/trunk/WebCore/page/Frame.h#L346
Causes us to pull in AnimationController.h:
https://trac.webkit.org/browser/trunk/WebCore/page/Frame.h#L31
Which pulls in additional headers of its own.
Frame.h is included by lots and lots of cpp files, most of which never
need AnimationController.h. Thus all of those intermediate files
(preprocessor output, assembler output, .o file, etc.) are larger than
necessary, causing longer builds. Also any time someone edits an
AnimationController.h (or a dependent .h) we end up re-building every
file which includes Frame.h (hundreds of files).
-eric
On Thu, Jun 10, 2010 at 3:56 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>
> On Jun 10, 2010, at 12:04 AM, Eric Seidel wrote:
>
>> This causes a huge header dependency cascade, bloating object files
>> and slowing down builds. I can't imagine avoiding the pointer
>> indirection is actually a measurable runtime savings (at least in most
>> cases).
>
> Can you give a specific example of a data member where you think OwnPtr would be better?
>
> Regards,
> Maciej
>
>
More information about the webkit-dev
mailing list