Bug 118827 - [gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
Summary: [gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-17 20:19 PDT by Nick Diego Yamane (diegoyam)
Modified: 2013-07-18 00:26 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.33 KB, patch)
2013-07-17 20:27 PDT, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff
Improved changelog. (3.31 KB, patch)
2013-07-17 20:44 PDT, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff
Patch (3.31 KB, patch)
2013-07-17 21:04 PDT, Nick Diego Yamane (diegoyam)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Diego Yamane (diegoyam) 2013-07-17 20:19:57 PDT
[gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
Comment 1 Nick Diego Yamane (diegoyam) 2013-07-17 20:24:28 PDT
webKitWebAudioSrcLoop() currently calls g_slist_index for each element to get its index in a list it's iterating over. g_list_index function uses a sequential search to find that element, which is clearly unecessary. This patch adds a local variable to store the current index and use it instead of calling g_slist_index funtion.
Comment 2 Nick Diego Yamane (diegoyam) 2013-07-17 20:27:02 PDT
Created attachment 206944 [details]
Patch
Comment 3 Nick Diego Yamane (diegoyam) 2013-07-17 20:44:04 PDT
Created attachment 206945 [details]
Improved changelog.
Comment 4 Nick Diego Yamane (diegoyam) 2013-07-17 21:04:50 PDT
Created attachment 206946 [details]
Patch

Fixing typo.
Comment 5 Philippe Normand 2013-07-17 23:54:07 PDT
Comment on attachment 206946 [details]
Patch

Looks good, thanks!
Comment 6 WebKit Commit Bot 2013-07-18 00:26:08 PDT
Comment on attachment 206946 [details]
Patch

Clearing flags on attachment: 206946

Committed r152832: <http://trac.webkit.org/changeset/152832>
Comment 7 WebKit Commit Bot 2013-07-18 00:26:10 PDT
All reviewed patches have been landed.  Closing bug.