Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d4ab1891c608410ee20bfffa1e7028d11e25bcf5
      
https://github.com/WebKit/WebKit/commit/d4ab1891c608410ee20bfffa1e7028d11e25bcf5
  Author: Jer Noble <[email protected]>
  Date:   2026-01-06 (Tue, 06 Jan 2026)

  Changed paths:
    M Source/WebCore/platform/audio/ios/AudioSessionIOS.h
    M Source/WebCore/platform/audio/ios/AudioSessionIOS.mm

  Log Message:
  -----------
  REGRESSION(304297@main) Increased CPU usage in audiomxd during playback
rdar://166810468
https://bugs.webkit.org/show_bug.cgi?id=305010

Reviewed by Eric Carlson.

304297@main fixed a behavior issue by calling 
HTMLMediaElement::canProduceAudioChanged()
in more circumstances than previously, but this had the side effect of 
increasing the
CPU usage in audiomxd as a result of certain properties being changed more 
often.

Specifically, the excess CPU time was spent executing 
-setPreferredIOBufferDuration:.
Reduce the cost of calling this method by caching the set value and returing 
early if
the same value is passed into AudioSessionIOS::setPreferredBufferSize().

* Source/WebCore/platform/audio/ios/AudioSessionIOS.h:
* Source/WebCore/platform/audio/ios/AudioSessionIOS.mm:
(-[WebInterruptionObserverHelper initWithCallback:]):
(-[WebInterruptionObserverHelper sessionMediaServicesWereReset:]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to