WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
125000
[WebGL] Wrong condition order in the if statement
https://bugs.webkit.org/show_bug.cgi?id=125000
Summary
[WebGL] Wrong condition order in the if statement
Przemyslaw Szymanski
Reported
2013-11-28 23:14:51 PST
We should make a more efficient if statements. In this case bool variable should be checked before string comparison. Only in one case (first check) a string variable will be compare. After that a bool variable is set and string should not be compare again.
Attachments
patch
(3.37 KB, patch)
2013-11-29 01:51 PST
,
Przemyslaw Szymanski
bfulgham
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Przemyslaw Szymanski
Comment 1
2013-11-29 01:51:24 PST
Created
attachment 218042
[details]
patch
Brent Fulgham
Comment 2
2014-01-09 19:34:52 PST
Comment on
attachment 218042
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=218042&action=review
You are right! Let's clean the change log up slightly and get this landed.
> Source/WebCore/ChangeLog:3 > + [WebGL] Wrong condition order in the if statement
[WebGL] Revise condition order for better performance
> Source/WebCore/ChangeLog:12 > + this method.
Please Rephrase: We should revise the logic so that we only pay the cost of string comparison once. The current logic causes the string comparison to happen every time we enter this function. Instead, by reordering the statements we can do a simple boolean test after the initial setup is complete.
Brent Fulgham
Comment 3
2014-01-10 10:02:16 PST
Comment on
attachment 218042
[details]
patch r=me. I'll fix the Changelog while landing.
Brent Fulgham
Comment 4
2014-01-10 10:08:11 PST
Committed
r161645
: <
http://trac.webkit.org/changeset/161645
>
Przemyslaw Szymanski
Comment 5
2014-01-13 03:29:46 PST
(In reply to
comment #3
)
> (From update of
attachment 218042
[details]
) > r=me. I'll fix the Changelog while landing.
Thank you very much for review of my patches. Unfortunately I didn't have time for update this commit message. Please be my guest to do this. cq?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug