[webkit-changes] [WebKit/WebKit] e874f2: Improve range creation

Przemyslaw Gorszkowski noreply at github.com
Thu Jul 27 03:55:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e874f2ecd0b7e296d097dde38ae8628857bc6ab6
      https://github.com/WebKit/WebKit/commit/e874f2ecd0b7e296d097dde38ae8628857bc6ab6
  Author: Przemyslaw Gorszkowski <pgorszkowski at igalia.com>
  Date:   2023-07-27 (Thu, 27 Jul 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/PlatformTimeRanges.cpp
    M Source/WebCore/platform/graphics/PlatformTimeRanges.h

  Log Message:
  -----------
  Improve range creation
https://bugs.webkit.org/show_bug.cgi?id=258866

Reviewed by Xabier Rodriguez-Calvar.

Before this change, finding the place where new range should be added/merged/created was done
with linear approach.
This change provides logarithmic approach to find the place for new range.

* Source/WebCore/platform/graphics/PlatformTimeRanges.cpp:
(WebCore::PlatformTimeRanges::add):
(WebCore::PlatformTimeRanges::findLastRangeIndexBefore const):
* Source/WebCore/platform/graphics/PlatformTimeRanges.h:

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




More information about the webkit-changes mailing list