Closed Bug 485036 Opened 17 years ago Closed 17 years ago

After playing <video>, Resampler2::ConvertAltivec_SmallIntegerRatio and DspFuncEQ::_equalizer() take significant amounts cpu time

Categories

(Core :: Audio/Video, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: smaug, Assigned: kinetik)

Details

(Keywords: fixed1.9.1, Whiteboard: [fixed1.9.1b4])

Attachments

(1 file)

After playing <video>, DspFuncEQ::_equalizer() takes significant amounts cpu time. The problem happens even if the window in which <video> is in is closed. And waiting cycle collector or anything like that doesn't help. There are also other audio related methods in the shark profile.
Flags: blocking1.9.1?
Summary: After playing <video>, DspFuncEQ::_equalizer() takes significant amounts cpu time → After playing <video>, 16.7% 16.7% AudioToolbox Resampler2::ConvertAltivec_SmallIntegerRatio and DspFuncEQ::_equalizer() take significant amounts cpu time
Summary: After playing <video>, 16.7% 16.7% AudioToolbox Resampler2::ConvertAltivec_SmallIntegerRatio and DspFuncEQ::_equalizer() take significant amounts cpu time → After playing <video>, Resampler2::ConvertAltivec_SmallIntegerRatio and DspFuncEQ::_equalizer() take significant amounts cpu time
But no sound is actually playing? Could be a Core Audio bug.
No, nothing is being played. Steps-to-reproduce, for example: Open Firefox, go to air.mozilla.org, click "Doug Turner talks Location in Mozilla" and wait until something is played. Open a new tab and close the one which has <video>. See CPU usage on Activity monitor or use Shark.
(I know nothing about our audio handling) do we release/close audio stream properly, when <video> is destroyed?
anyone out there to help confirm this? tchung: smaug: bug 483841? [2:05pm] firebot: tchung: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=483841 nor, --, ---, roc@ocallahan.org, RESO FIXED, 100% cpu usage on page with video before playing video [2:06pm] smaug: doesn't sound right [2:06pm] smaug: it is not 100% cpu usage [2:06pm] smaug: it something like 15% [2:08pm] tchung: smaug: alright, i'll see if i can confirm it. this is trunk builds, mac osx? smaug: trunk, osx, ues [2:08pm] smaug: er [2:08pm] smaug: yes [2:08pm] tchung: extensions running? [2:08pm] smaug: no [2:09pm] smaug: osx 10.5, if that makes any difference
Actually it may be less than 15%, but certainly more than before playing the video and audio handling methods are in the Shark profile.
The patch in bug 484935 might help reduce some of the noise, it fixes some CPU usage issues the controls are causing.
(In reply to comment #7) > The patch in bug 484935 might help reduce some of the noise, it fixes some CPU > usage issues the controls are causing. Smaug, can you try testing this off tomorrow's nightly, after patch kicks in? I just tried steps from comment #2, and this is my observations. 1) load new profile and air.mozilla.com, dont play video yet. CPU hovers around 5.5% - 6.1% 2) start video of dougt and play for 30 seconds. Video jumps up to 100%, and drops to around 68% 3) Kill <video> tab. CPU hovers around 6.0%
Oh, this was tested on: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090324 Minefield/3.6a1pre. No extensions running.
It looks like we never shut down the nsAudioStream, so the audio_callback continues to run.
Fix. Given the overhead that an idle nsAudioStream has (under OS X, at least), I wonder if we should make an effort to close the audio stream when paused too. With roc's mediacache patch, we don't shut down the decoder when playback completes, so when that lands we should probably shut down the audio stream once we reach playback complete, too.
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Attachment #369206 - Flags: superreview?(roc)
Attachment #369206 - Flags: review?(chris.double)
Attachment #369206 - Flags: superreview?(roc) → superreview+
Attachment #369206 - Flags: review?(chris.double) → review+
Whiteboard: [needs landing]
(In reply to comment #11) > Given the overhead that an idle nsAudioStream has (under OS X, at least), I > wonder if we should make an effort to close the audio stream when paused too. Chris pointed out that we already do this.
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Attachment #369206 - Attachment description: patch v0 → patch v0 [Checkin: Comment 13 & 14]
Whiteboard: [needs 191 landing] → [fixed1.9.1b4]
Target Milestone: --- → mozilla1.9.2a1
Depends on: 486970
No longer depends on: 486970
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: