Summary: | g_slist_reverse() may not be required in webKitWebAudioSrcLoop | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Praveen Jadhav <praveen.j> | ||||||||
Component: | Web Audio | Assignee: | Praveen Jadhav <praveen.j> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Minor | CC: | cdumez, crogers, dev_sachin, eric.carlson, feature-media-reviews, jer.noble, pnormand, s.choi, webkit.review.bot | ||||||||
Priority: | P3 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Praveen Jadhav
2013-03-29 04:35:15 PDT
Created attachment 195722 [details]
Patch
Basically, this change reduces the no. of instructions generated for webKitWebAudioSrcLoop.
Comment on attachment 195722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=195722&action=review Looks good but I'd like to test this patch before landing > Source/WebCore/ChangeLog:8 > + Decremental for loop logic implemented to avoid using g_slist_reverse(). This could be expanded a bit, explaining the performance gain. > Source/WebCore/ChangeLog:10 > + No new tests (OOPS!). You'd need to remove this line unless you state the patch is covered by existing webaudio tests. Ok I tested it, if you can improve the ChangeLog a bit it'd be great :) (In reply to comment #2) > (From update of attachment 195722 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=195722&action=review > > Looks good but I'd like to test this patch before landing > > > Source/WebCore/ChangeLog:8 > > + Decremental for loop logic implemented to avoid using g_slist_reverse(). > > This could be expanded a bit, explaining the performance gain. I tested with basic audiocontext with 2 destination channels only(No other nodes webaudio nodes are created). Calculated the time taken to execute webKitWebAudioSrcLoop() for 100000 iteration and the details are as below. Original code - 2.025230 micro seconds Original code + patch - 1.964759 micro seconds Its a small gain indeed, but a gain nevertheless. Given the frequency with which webKitWebAudioSrcLoop() is called, CPU load should decrease a bit. > > > Source/WebCore/ChangeLog:10 > > + No new tests (OOPS!). > > You'd need to remove this line unless you state the patch is covered by existing webaudio tests. I will update the patch shortly. Created attachment 195842 [details]
Patch
Patch updated as per review comments.
(In reply to comment #4) > (In reply to comment #2) > > (From update of attachment 195722 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=195722&action=review > > > > Looks good but I'd like to test this patch before landing > > > > > Source/WebCore/ChangeLog:8 > > > + Decremental for loop logic implemented to avoid using g_slist_reverse(). > > > > This could be expanded a bit, explaining the performance gain. > > I tested with basic audiocontext with 2 destination channels only(No other nodes webaudio nodes are created). Calculated the time taken to execute webKitWebAudioSrcLoop() for 100000 iteration and the details are as below. > > Original code - 2.025230 micro seconds > Original code + patch - 1.964759 micro seconds Correction: it is Original code - 2.025230 micro seconds per function execution Original code + patch - 1.964759 micro seconds per function execution > > Its a small gain indeed, but a gain nevertheless. Given the frequency with which webKitWebAudioSrcLoop() is called, CPU load should decrease a bit. > > > > > > Source/WebCore/ChangeLog:10 > > > + No new tests (OOPS!). > > > > You'd need to remove this line unless you state the patch is covered by existing webaudio tests. > > I will update the patch shortly. Ok it's good you made some measurements, can you put this explanation in the ChangeLog itself please? FYI - changed assignee to Praveen Jadhav. Created attachment 195851 [details]
Patch
Comment on attachment 195851 [details] Patch Clearing flags on attachment: 195851 Committed r147278: <http://trac.webkit.org/changeset/147278> All reviewed patches have been landed. Closing bug. |