[webkit-changes] [WebKit/WebKit] b98bb7: Make findPropertyIndex & findCustomPropertyIndex f...

Ahmad Saleem noreply at github.com
Wed Feb 1 16:43:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b98bb73bfb6f9ae4587896ec0eefd76fde9f4aec
      https://github.com/WebKit/WebKit/commit/b98bb73bfb6f9ae4587896ec0eefd76fde9f4aec
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-02-01 (Wed, 01 Feb 2023)

  Changed paths:
    M Source/WebCore/css/MutableStyleProperties.cpp

  Log Message:
  -----------
  Make findPropertyIndex & findCustomPropertyIndex faster

Make findPropertyIndex & findCustomPropertyIndex faster
https://bugs.webkit.org/show_bug.cgi?id=250581
rdar://problem/104479595

Reviewed by Darin Adler.

Merge - https://chromium.googlesource.com/chromium/blink/+/501ce3bc186b2bf535ecf3af9f3ce973fe13fd4c

This patch is potential optimization, which is by modifying to remove calls to
"WTF::Vector::at()" from 'findPropertyIndex' and 'findCustomPropertyIndex' functions.

* Source/WebCore/css/MutableStyleProperties.cpp:
(MutableStyleProperties::findPropertyIndex): Add variable for 'm_propertyVector.data()'
and use it instead of 'm_propertyVector.at(n)'
(MutableStyleProperties::findCustomPropertyIndex): Ditto

Canonical link: https://commits.webkit.org/259726@main




More information about the webkit-changes mailing list