-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate ImmutableStyleProperties
https://bugs.webkit.org/show_bug.cgi?id=259972 rdar://113622930 Reviewed by Alan Baradlay. It is common for the same style declarations to repeat. On some sites >50% of declarations are duplicates. This patch add support for hashing simple CSSValues. This mechanism may have other uses in future too. * Source/WebCore/css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcResourceValue::equals const): Also fix equality comparison here. * Source/WebCore/css/CSSFunctionValue.cpp: (WebCore::CSSFunctionValue::addDerivedHash const): * Source/WebCore/css/CSSFunctionValue.h: * Source/WebCore/css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::addDerivedHash const): * Source/WebCore/css/CSSPrimitiveValue.h: * Source/WebCore/css/CSSValue.cpp: (WebCore::CSSValue::visitDerived): (WebCore::CSSValue::addHash const): (WebCore::CSSValue::addDerivedHash const): (WebCore::add): * Source/WebCore/css/CSSValue.h: * Source/WebCore/css/CSSValueList.cpp: (WebCore::CSSValueContainingVector::addDerivedHash const): * Source/WebCore/css/CSSValueList.h: * Source/WebCore/css/CSSValuePair.cpp: (WebCore::CSSValuePair::addDerivedHash const): * Source/WebCore/css/CSSValuePair.h: * Source/WebCore/css/ImmutableStyleProperties.cpp: (WebCore::deduplicationMap): (WebCore::ImmutableStyleProperties::createDeduplicating): Deduplicate using a map. (WebCore::ImmutableStyleProperties::clearDeduplicationMap): * Source/WebCore/css/ImmutableStyleProperties.h: * Source/WebCore/css/StyleProperties.cpp: (WebCore::StyleProperties::immutableCopyIfNeeded const): * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::createStyleProperties): * Source/WebCore/page/MemoryRelease.cpp: (WebCore::releaseNoncriticalMemory): Canonical link: https://commits.webkit.org/266770@main
- Loading branch information
Showing
16 changed files
with
252 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.