|
|
Created:
4 years, 2 months ago by Avi (use Gerrit) Modified:
4 years, 2 months ago Reviewers:
davidben CC:
chromium-reviews, cbentzel+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionRemove stl_util's deletion functions from net/url_request/.
BUG=555865
Committed: https://crrev.com/e26ffff3fab1b525479daf9986cde96fc88fad07
Cr-Commit-Position: refs/heads/master@{#422888}
Patch Set 1 #
Total comments: 2
Patch Set 2 : vector #Patch Set 3 : to map #
Messages
Total messages: 23 (15 generated)
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
avi@chromium.org changed reviewers: + davidben@chromium.org
https://codereview.chromium.org/2385003002/diff/1/net/url_request/report_send... File net/url_request/report_sender.cc (right): https://codereview.chromium.org/2385003002/diff/1/net/url_request/report_send... net/url_request/report_sender.cc:81: inflight_requests_.erase(it); I should have noticed this for the other CL, but if we're doing this, the std::set is buying us nothing but overhead. It'd be strictly better to use a std::vector of unique_ptr. These can also potentially trigger one per URLRequest so I'm not very comfortable with it being O(N). This is actually a really common pattern where one object owns a bunch of jobs and drops them when completed. I think it would be good to just write a base::OwnedSet<T> and use that. (Or maybe some linked list thing? That would actually be a more efficient structure.)
https://codereview.chromium.org/2385003002/diff/1/net/url_request/report_send... File net/url_request/report_sender.cc (right): https://codereview.chromium.org/2385003002/diff/1/net/url_request/report_send... net/url_request/report_sender.cc:81: inflight_requests_.erase(it); On 2016/10/03 16:01:38, davidben wrote: > I should have noticed this for the other CL, but if we're doing this, the > std::set is buying us nothing but overhead. It'd be strictly better to use a > std::vector of unique_ptr. > > These can also potentially trigger one per URLRequest so I'm not very > comfortable with it being O(N). This is actually a really common pattern where > one object owns a bunch of jobs and drops them when completed. I think it would > be good to just write a base::OwnedSet<T> and use that. (Or maybe some linked > list thing? That would actually be a more efficient structure.) If we're talking efficiency, linked lists and sets are bad. They guarantee a cache miss for every access, so that even an O(n) access into a vector is better performing than an "O(log n)" access that has zero memory locality. sets of owned objects are kinda broken in C++11 anyway, so I would be super happy to swap in a vector here.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
David, I switched to a map. Please take a look.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm. (Sorry, didn't have time to follow-up yesterday. I could buy a vector would even be better and I think I'd be fine with that too, but it's nice that this way we don't have to think about it.)
The CQ bit was checked by avi@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== Remove stl_util's deletion functions from net/url_request/. BUG=555865 ========== to ========== Remove stl_util's deletion functions from net/url_request/. BUG=555865 Committed: https://crrev.com/e26ffff3fab1b525479daf9986cde96fc88fad07 Cr-Commit-Position: refs/heads/master@{#422888} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/e26ffff3fab1b525479daf9986cde96fc88fad07 Cr-Commit-Position: refs/heads/master@{#422888} |