WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126876
Avoid unnecessary copies of AccessibilityObject::AccessibilityChildrenVector
https://bugs.webkit.org/show_bug.cgi?id=126876
Summary
Avoid unnecessary copies of AccessibilityObject::AccessibilityChildrenVector
Zan Dobersek
Reported
2014-01-13 01:48:50 PST
Avoid unnecessary copies of AccessibilityObject::AccessibilityChildrenVector
Attachments
Patch
(32.24 KB, patch)
2014-01-13 01:58 PST
,
Zan Dobersek
kling
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Zan Dobersek
Comment 1
2014-01-13 01:57:56 PST
Avoiding the copies is a huge win on the GTK port. Testing the load of the singe-page HTML Living Standard[1] with WebKitTestRunner, the number of copies is reduced from hundreds of thousands to 75-300. [1]
http://www.whatwg.org/specs/web-apps/current-work/
Zan Dobersek
Comment 2
2014-01-13 01:58:54 PST
Created
attachment 221016
[details]
Patch
Zan Dobersek
Comment 3
2014-01-13 03:15:34 PST
Committed
r161873
: <
http://trac.webkit.org/changeset/161873
>
chris fleizach
Comment 4
2014-01-13 05:55:45 PST
Comment on
attachment 221016
[details]
Patch I think we probably should use auto in all these cases
Zan Dobersek
Comment 5
2014-01-13 13:02:43 PST
(In reply to
comment #4
)
> (From update of
attachment 221016
[details]
) > I think we probably should use auto in all these cases
Do these cases align with any of the guildelines on using auto that were recently discussed on webkit-dev? AccessibilityObject::children() doesn't specifically note that a reference to the vector of object's children is being returned. I'd very much like to use auto here, as long as it is used in line with the guidelines.
chris fleizach
Comment 6
2014-01-13 13:03:49 PST
(In reply to
comment #4
)
> (From update of
attachment 221016
[details]
) > I think we probably should use auto in all these cases
https://bugs.webkit.org/show_bug.cgi?id=126915
chris fleizach
Comment 7
2014-01-13 13:04:19 PST
(In reply to
comment #5
)
> (In reply to
comment #4
) > > (From update of
attachment 221016
[details]
[details]) > > I think we probably should use auto in all these cases > > Do these cases align with any of the guildelines on using auto that were recently discussed on webkit-dev? AccessibilityObject::children() doesn't specifically note that a reference to the vector of object's children is being returned. > > I'd very much like to use auto here, as long as it is used in line with the guidelines.
After reading that discussion, I feel like this would probably fit the criteria. It removes a lot of disgusting code to write
Zan Dobersek
Comment 8
2014-01-13 13:10:08 PST
(In reply to
comment #7
)
> (In reply to
comment #5
) > > (In reply to
comment #4
) > > > (From update of
attachment 221016
[details]
[details] [details]) > > > I think we probably should use auto in all these cases > > > > Do these cases align with any of the guildelines on using auto that were recently discussed on webkit-dev? AccessibilityObject::children() doesn't specifically note that a reference to the vector of object's children is being returned. > > > > I'd very much like to use auto here, as long as it is used in line with the guidelines. > > After reading that discussion, I feel like this would probably fit the criteria. It removes a lot of disgusting code to write
Ah, changing to using the range-based for loops in
bug #126876
makes things much better-looking, and auto also makes sense in that context.
chris fleizach
Comment 9
2014-01-13 13:16:40 PST
(In reply to
comment #8
)
> (In reply to
comment #7
) > > (In reply to
comment #5
) > > > (In reply to
comment #4
) > > > > (From update of
attachment 221016
[details]
[details] [details] [details]) > > > > I think we probably should use auto in all these cases > > > > > > Do these cases align with any of the guildelines on using auto that were recently discussed on webkit-dev? AccessibilityObject::children() doesn't specifically note that a reference to the vector of object's children is being returned. > > > > > > I'd very much like to use auto here, as long as it is used in line with the guidelines. > > > > After reading that discussion, I feel like this would probably fit the criteria. It removes a lot of disgusting code to write > > Ah, changing to using the range-based for loops in
bug #126876
makes things much better-looking, and auto also makes sense in that context.
The question I had is whether a range based loop will ensure that only a reference is used.
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