RESOLVED FIXED 158084
Simplify and inline minimumValueForLength()
https://bugs.webkit.org/show_bug.cgi?id=158084
Summary Simplify and inline minimumValueForLength()
Chris Dumez
Reported 2016-05-25 13:47:01 PDT
Simplify and inline minimumValueForLength(). Based on iOS PLT profiles, we spend up to 0.7% of CPU time during page loads in this function.
Attachments
Patch (8.69 KB, patch)
2016-05-25 13:48 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-05-25 13:48:28 PDT
WebKit Commit Bot
Comment 2 2016-05-25 14:12:13 PDT
Comment on attachment 279803 [details] Patch Clearing flags on attachment: 279803 Committed r201401: <http://trac.webkit.org/changeset/201401>
WebKit Commit Bot
Comment 3 2016-05-25 14:12:18 PDT
All reviewed patches have been landed. Closing bug.
Said Abou-Hallawa
Comment 4 2016-05-25 14:24:37 PDT
Comment on attachment 279803 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=279803&action=review I think also there is no real need for the sources LengthFunctions.h and LengthFunctions.cpp. All the functions in these files can be moved to Length.h and LengthSize.h. The names of the functions should be shorter and clearer. Instead of having inline LayoutUnit minimumValueForLength(const Length& length, LayoutUnit maximumValue) We can have inline LayoutUnit Length::minimumValue(LayoutUnit maximumValue) const; > Source/WebCore/css/LengthFunctions.h:38 > +int minimumIntValueForLength(const Length&, LayoutUnit maximumValue); This function is called only twice in the windows code. Can't we make the casting inline? > Source/WebCore/css/LengthFunctions.h:39 > int intValueForLength(const Length&, LayoutUnit maximumValue); I am not sure why do we need intValueForLength() especially all what it does is just casting which can be inline. Also it is only used in 6 places; 4 of them in in one block of code.
Ahmad Saleem
Comment 5 2024-07-08 16:11:36 PDT
*** Bug 134495 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.