If shadow trees have identical inline stylesheets the data structures can be shared. This will also allow sharing style resolvers in future.
Created attachment 291390 [details] patch
Comment on attachment 291390 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=291390&action=review > Source/WebCore/dom/InlineStyleSheetOwner.cpp:192 > + fprintf(stderr, "retrieved inline stylesheet from cache, rules=%d\n", cachedSheet->ruleCount()); Well I suppose that's good to know about... > Source/WebCore/dom/InlineStyleSheetOwner.cpp:209 > + fprintf(stderr, "adding stylesheet to cache, rules=%d\n", m_sheet->contents().ruleCount()); More great information! > Source/WebCore/platform/MemoryPressureHandler.cpp:111 > + { > + ReliefLogger log("Clear inline stylesheet cache"); > + InlineStyleSheetOwner::clearCache(); > + } r=me based on this.
Comment on attachment 291390 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=291390&action=review > Source/WebCore/css/parser/CSSParserMode.h:126 > + hash ^= URLHash::hash(key.baseURL); > + hash ^= StringHash::hash(key.charset); > + hash ^= WTF::intHash(static_cast<unsigned>(key.mode)); Is there a better way to combine hash? > Source/WebCore/dom/InlineStyleSheetOwner.cpp:192 > + fprintf(stderr, "retrieved inline stylesheet from cache, rules=%d\n", cachedSheet->ruleCount()); Debugging code? > Source/WebCore/dom/InlineStyleSheetOwner.cpp:209 > + fprintf(stderr, "adding stylesheet to cache, rules=%d\n", m_sheet->contents().ruleCount()); Debugging code?
Comment on attachment 291390 [details] patch Oops, sorry, didn't mean to clear the r+.
https://trac.webkit.org/changeset/207286
Comment on attachment 291390 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=291390&action=review >> Source/WebCore/css/parser/CSSParserMode.h:126 >> + hash ^= WTF::intHash(static_cast<unsigned>(key.mode)); > > Is there a better way to combine hash? Longer term, the better way to hash a bunch of things is to construct a single hasher and then hash one item after another. Doing an exclusive or of hashes is nowhere near as a good as that. To make then hashes better in cases like this one I would like us to make a hasher class that is perhaps a bit like StringBuilder and lets us easily hash a sequence of different types of data and make a single hash out of all of it. Presumably we want to usually avoid both the "exclusive or'd hashes" pattern and even the "hash of hashes" pattern.
Reverted r207286 for reason: Caused LayoutTest http/tests/misc/acid3.html to fail. Committed r207291: <http://trac.webkit.org/changeset/207291>
*** Bug 163391 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > Reverted r207286 for reason: > > Caused LayoutTest http/tests/misc/acid3.html to fail. > > Committed r207291: <http://trac.webkit.org/changeset/207291> Details in https://bugs.webkit.org/show_bug.cgi?id=163391
Created attachment 291612 [details] patch
Comment on attachment 291612 [details] patch Attachment 291612 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2283784 Number of test failures exceeded the failure limit.
Created attachment 291617 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 291612 [details] patch Attachment 291612 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2283857 Number of test failures exceeded the failure limit.
Created attachment 291619 [details] Archive of layout-test-results from ews113 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 291612 [details] patch Attachment 291612 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2283893 Number of test failures exceeded the failure limit.
Created attachment 291620 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 291612 [details] patch Attachment 291612 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2284000 Number of test failures exceeded the failure limit.
Created attachment 291622 [details] Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 291623 [details] patch
Comment on attachment 291623 [details] patch Attachment 291623 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2284225 Number of test failures exceeded the failure limit.
Created attachment 291626 [details] Archive of layout-test-results from ews112 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 291623 [details] patch Attachment 291623 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2284266 Number of test failures exceeded the failure limit.
Created attachment 291628 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 291623 [details] patch Attachment 291623 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2284269 Number of test failures exceeded the failure limit.
Created attachment 291629 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 291623 [details] patch Attachment 291623 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2284275 Number of test failures exceeded the failure limit.
Created attachment 291630 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Created attachment 291631 [details] patch
https://trac.webkit.org/r207339