Bug 110399

Summary: LevelDB: Remove excess vector copy
Product: WebKit Reporter: Alec Flett <alecflett>
Component: New BugsAssignee: Alec Flett <alecflett>
Status: RESOLVED FIXED    
Severity: Normal CC: dgrogan, jsbell, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alec Flett 2013-02-20 15:55:49 PST
LevelDB: Remove excess vector copy
Comment 1 Alec Flett 2013-02-20 15:56:51 PST
Created attachment 189398 [details]
Patch
Comment 2 Alec Flett 2013-02-20 15:59:01 PST
tony@ - it looks like someone thought they were going to benefit from NRVO optimization, but that isn't possible because the return object is a reference that comes in via a parameter. Instead, we get an extra copy.

I did a blame and looked back - this looks like it corresponds to the original checkin of LevelDBDatabase.cpp by hans@chromium.org so it doesn't look like this was any kind of purposefully optimization.
Comment 3 WebKit Review Bot 2013-02-20 16:51:40 PST
Comment on attachment 189398 [details]
Patch

Clearing flags on attachment: 189398

Committed r143538: <http://trac.webkit.org/changeset/143538>
Comment 4 WebKit Review Bot 2013-02-20 16:51:43 PST
All reviewed patches have been landed.  Closing bug.