Bug 23622

Summary: create CFString and NSString objects from WebCore::String without copying the characters
Product: WebKit Reporter: Darin Adler <darin>
Component: PlatformAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, mrowe, slewis
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
fist steps
none
patch
darin: review-
patch -- this time I think it handles threading acceptably
mrowe: review+
final patch with changes requested by Mark
none
more final none

Darin Adler
Reported 2009-01-29 09:50:18 PST
Mark and I realized this is possible and we think it will be a good performance optimization.
Attachments
fist steps (2.66 KB, patch)
2009-01-29 09:51 PST, Darin Adler
no flags
patch (7.08 KB, patch)
2009-01-30 10:09 PST, Darin Adler
darin: review-
patch -- this time I think it handles threading acceptably (8.01 KB, patch)
2009-01-30 17:56 PST, Darin Adler
mrowe: review+
final patch with changes requested by Mark (7.94 KB, patch)
2009-01-30 18:18 PST, Darin Adler
no flags
more final (7.91 KB, patch)
2009-01-30 18:26 PST, Darin Adler
no flags
Darin Adler
Comment 1 2009-01-29 09:51:01 PST
Created attachment 27150 [details] fist steps
Darin Adler
Comment 2 2009-01-30 10:09:17 PST
Darin Adler
Comment 3 2009-01-30 10:29:28 PST
Comment on attachment 27186 [details] patch Non-main-thread handling is wrong here. I'll have to make a new version.
Mark Rowe (bdash)
Comment 4 2009-01-30 11:54:01 PST
Comment on attachment 27186 [details] patch Shouldn't the #if PLATFORM(MAC) || !defined(BUILDING_ON_TIGER) checks have an && rather than ||?
Darin Adler
Comment 5 2009-01-30 12:14:57 PST
(In reply to comment #4) > Shouldn't the #if PLATFORM(MAC) || !defined(BUILDING_ON_TIGER) checks have an > && rather than ||? Yes. Thanks for spotting that.
Darin Adler
Comment 6 2009-01-30 17:56:38 PST
Created attachment 27205 [details] patch -- this time I think it handles threading acceptably
Mark Rowe (bdash)
Comment 7 2009-01-30 18:12:36 PST
Comment on attachment 27205 [details] patch -- this time I think it handles threading acceptably The calls to the system memory allocator should probably use FastMalloc instead, and the code may be slightly easier to follow if create() and allocator() were closer in the code. r=me
Darin Adler
Comment 8 2009-01-30 18:18:23 PST
I'm going to attach the final patch here so Stephanie can more easily do some performance testing rolling it in and out.
Darin Adler
Comment 9 2009-01-30 18:18:44 PST
Created attachment 27206 [details] final patch with changes requested by Mark
Darin Adler
Comment 10 2009-01-30 18:26:59 PST
Created attachment 27208 [details] more final
Darin Adler
Comment 11 2009-02-01 07:28:08 PST
Note You need to log in before you can comment on or make changes to this bug.