Bug 74641 - [MutationObservers] Add a document-level flag that can trivially be checked to avoid doing unnessary work if mutation observers absent
Summary: [MutationObservers] Add a document-level flag that can trivially be checked t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rafael Weinstein
URL:
Keywords:
Depends on:
Blocks: 68729
  Show dependency treegraph
 
Reported: 2011-12-15 12:49 PST by Rafael Weinstein
Modified: 2011-12-15 16:59 PST (History)
7 users (show)

See Also:


Attachments
Patch (34.16 KB, patch)
2011-12-15 13:00 PST, Rafael Weinstein
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Weinstein 2011-12-15 12:49:15 PST
Right now, discovering there is no work to do still costs a number of function calls and checks. We should get this down to one function call and one check at most.
Comment 1 Rafael Weinstein 2011-12-15 13:00:17 PST
Created attachment 119486 [details]
Patch
Comment 2 WebKit Review Bot 2011-12-15 13:04:22 PST
Attachment 119486 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1

Source/WebCore/WebCore.vcproj/WebCore.vcproj:43816:  mismatched tag  [xml/syntax] [5]
Total errors found: 1 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ojan Vafai 2011-12-15 14:19:25 PST
Comment on attachment 119486 [details]
Patch

Patch looks fine. EWS seems unhappy with your build file changes though.
Comment 4 Ryosuke Niwa 2011-12-15 15:15:34 PST
Comment on attachment 119486 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=119486&action=review

> Source/WebCore/ChangeLog:8
> +        This patch adds a byte of flags to Document, of which three bits are used to signal if any

Enum usually takes 4 bytes in 32-bit architecture and 8 bytes in 64-bit architecture due to alignments. Because the previous member variable (m_listenerTypes) is unsigned short, gcc/clang may pack it into the same 4 byte but cl.exe will almost certainly allocate 4 bytes for each. It's not big of a deal anyway though.
Comment 5 Adam Klein 2011-12-15 16:59:45 PST
Comment on attachment 119486 [details]
Patch

Clearing flags on attachment: 119486

Committed r103001: <http://trac.webkit.org/changeset/103001>
Comment 6 Adam Klein 2011-12-15 16:59:49 PST
All reviewed patches have been landed.  Closing bug.