Closed Bug 898218 Opened 11 years ago Closed 11 years ago

Wasted work in WebRtcNetEQ_DtmfInsertEvent()

Categories

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

x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: pchang9, Unassigned)

Details

(Keywords: perf)

Attachments

(1 file)

Attached patch Suggested patch (deleted) — Splinter Review
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 (Beta/Release) Build ID: 20130116073211 Steps to reproduce: The problem appears in changeset 138350:18467a85acf6. I have attached a simple one-line patch that fixes it. In method WebRtcNetEQ_DtmfInsertEvent() in media/webrtc/trunk/webrtc/modules/audio_coding/neteq/dtmf_buffer.c, the loop in line 121 keeps overriding "position" with "i" when "((DTMFdec_inst->EventQueue[i] == value) && (!DTMFdec_inst->EventQueueEnded[i] || endEvent))" is true. Therefore, only the last written value is visible out of the loop and all the other writes and iterations are not necessary. The patch iterates from the end of "i" and breaks the first time when "position" is set.
Keywords: perf
Version: 18 Branch → Trunk
OS: Windows 7 → All
Attachment #781372 - Attachment is patch: true
Please see https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch > The problem appears in changeset 138350:18467a85acf6. https://hg.mozilla.org/mozilla-central/rev/18467a85acf6 ? > In method WebRtcNetEQ_DtmfInsertEvent() in media/webrtc/trunk/webrtc/modules/audio_coding/neteq/dtmf_buffer.c, the loop in line 121 https://hg.mozilla.org/mozilla-central/file/18467a85acf6/media/webrtc/trunk/webrtc/modules/audio_coding/neteq/dtmf_buffer.c#l120
Component: Untriaged → WebRTC: Audio/Video
Product: Firefox → Core
This is a minor perf issue in the upstream library. As it's not a significant flaw or problem in Mozilla, please file an Issue at http://code.google.com/p/webrtc/issues/list See http://www.webrtc.org/reference/contributing for how to prepare a CL for review and upload it there; we'll pick up the fix when it gets to a stable branch of webrtc.org. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
No longer blocks: webrtc_upstream_bugs
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: