Bug 79299 - Type tags in NodeFlags could be compressed
Summary: Type tags in NodeFlags could be compressed
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hajime Morrita
URL:
Keywords:
Depends on: 84511
Blocks: 77860
  Show dependency treegraph
 
Reported: 2012-02-22 16:30 PST by Hajime Morrita
Modified: 2012-04-20 16:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (10.26 KB, patch)
2012-04-16 00:09 PDT, Hajime Morrita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hajime Morrita 2012-02-22 16:30:38 PST
We have type tags like:

        IsTextFlag = 1,
        IsCommentFlag = 1 << 1,
        IsContainerFlag = 1 << 2,
        IsElementFlag = 1 << 3,
        IsStyledElementFlag = 1 << 4,
        IsHTMLFlag = 1 << 5,
        IsSVGFlag = 1 << 6,
        InDocumentFlag = 1 << 9,
        IsShadowRootOrSVGShadowRootFlag = 1 << 16,

And these are apparently redundant. We could compress these.
Comment 1 Antti Koivisto 2012-02-22 16:35:51 PST
(In reply to comment #0)
>         InDocumentFlag = 1 << 9,

This one is not redundant.
Comment 2 Hajime Morrita 2012-04-16 00:09:25 PDT
Created attachment 137289 [details]
Patch
Comment 3 Hajime Morrita 2012-04-16 18:17:31 PDT
As Ryosuke's request at #webkit, I took two bencharks from Dromaeo which hit DOM heavily:

dom-modify:     before            after
avg                3,816.93     3,819.05
stdev                  44.37          90.98

dom-traverse:      before            after
avg                  2,472.91     2,520.09
stdev                    62.35          48.05

The lager number is better.
This even shows a tiny improvement. But it's unlikely. It will be just a noise.
I think we can say that this has no observable performance impact.
Comment 4 WebKit Review Bot 2012-04-16 19:15:35 PDT
Comment on attachment 137289 [details]
Patch

Clearing flags on attachment: 137289

Committed r114333: <http://trac.webkit.org/changeset/114333>
Comment 5 WebKit Review Bot 2012-04-16 19:15:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Ryosuke Niwa 2012-04-16 19:32:33 PDT
Thanks for the perf. analysis.
Comment 7 Hajime Morrita 2012-04-20 16:46:46 PDT
Reopening due to the report: https://bugs.webkit.org/show_bug.cgi?id=84511
Comment 8 Hajime Morrita 2012-04-20 16:49:31 PDT
See: https://bugs.webkit.org/show_bug.cgi?id=84497