Closed Bug 1871639 Opened 2 years ago Closed 1 year ago

Performance inefficiencies (COPY_INSTEAD_OF_MOVE) in netwerk/dns/NativeDNSResolverOverrideParent.cpp

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: jesup, Assigned: thampan)

Details

(Keywords: good-first-bug, Whiteboard: [necko-triaged])

Attachments

(1 file)

** CID 1559863:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/netwerk/dns/NativeDNSResolverOverrideParent.cpp: 67 in mozilla::net::NativeDNSResolverOverrideParent::AddHTTPSRecordOverride(const nsTSubstring<char> &, const unsigned char *, unsigned int)()


________________________________________________________________________________________________________
*** CID 1559863:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/netwerk/dns/NativeDNSResolverOverrideParent.cpp: 67 in mozilla::net::NativeDNSResolverOverrideParent::AddHTTPSRecordOverride(const nsTSubstring<char> &, const unsigned char *, unsigned int)()
61     }
62     
63     NS_IMETHODIMP NativeDNSResolverOverrideParent::AddHTTPSRecordOverride(
64         const nsACString& aHost, const uint8_t* aData, uint32_t aLength) {
65       nsCString host(aHost);
66       CopyableTArray<uint8_t> data(aData, aLength);
>>>     CID 1559863:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "host" is copied in call to copy constructor "nsTString<char>", when it could be moved instead.
67       auto task = [self = RefPtr{this}, host, data = std::move(data)]() {
68         Unused << self->SendAddHTTPSRecordOverride(host, data);
69       };
70       gIOService->CallOrWaitForSocketProcess(std::move(task));
71       return NS_OK;
72     }
Keywords: good-first-bug
Whiteboard: [good-first-bug][necko-triaged] → [necko-triaged]

Hi, Could you please assign this issue to me? Thanks!

Assignee: nobody → jishnu.mt

If the changes are fine, could you please help in landing the patch?

Flags: needinfo?(valentin.gosu)

Queued for landing.

Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com: https://github.com/mozilla-firefox/firefox/commit/9c009c361b3f https://hg.mozilla.org/integration/autoland/rev/bd1fd234a81c Performance inefficiencies (COPY_INSTEAD_OF_MOVE) in netwerk/dns/NativeDNSResolverOverrideParent.cpp. r=necko-reviewers,valentin
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch

Thanks for landing!

QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: