WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
8039
Remove use of DeprecatedArray in favor of new Vector class
https://bugs.webkit.org/show_bug.cgi?id=8039
Summary
Remove use of DeprecatedArray in favor of new Vector class
Sam Weinig
Reported
2006-03-28 13:16:26 PST
Most of the changes require only a change of name from DeprecatedArray<> to Vector<> in variable declarations and little else to retain the same functionality. However, since the Vector class has some different/better qualities/features, other changes would be beneficial.
Attachments
patch
(29.66 KB, patch)
2006-03-29 23:01 PST
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
patch 2
(71.13 KB, patch)
2006-04-02 10:02 PDT
,
Sam Weinig
no flags
Details
Formatted Diff
Diff
patch 3
(82.66 KB, patch)
2006-04-03 12:40 PDT
,
Sam Weinig
hyatt
: review-
Details
Formatted Diff
Diff
patch the fourth
(64.15 KB, patch)
2006-04-25 15:55 PDT
,
Sam Weinig
hyatt
: review+
Details
Formatted Diff
Diff
patch for image and caching classes
(39.14 KB, patch)
2006-05-02 12:15 PDT
,
Sam Weinig
hyatt
: review-
Details
Formatted Diff
Diff
updated image and caching patch
(38.59 KB, patch)
2006-05-09 19:55 PDT
,
Sam Weinig
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2006-03-29 23:01:41 PST
Created
attachment 7382
[details]
patch This removes quite a bit of the DeprecatedArray usage, but more remains.
Sam Weinig
Comment 2
2006-04-02 10:02:35 PDT
Created
attachment 7465
[details]
patch 2 This takes care of most of the DeprecatedArray uses. Now all that remains is in the DeprecatedCString class (which I have not attempted because it is itself deprecated), and all the image relate code (which I is a little more complicated but will be in the next version).
Eric Seidel (no email)
Comment 3
2006-04-03 02:34:39 PDT
Make sure to mark your patch for review :)
Sam Weinig
Comment 4
2006-04-03 12:40:40 PDT
Created
attachment 7488
[details]
patch 3 This is quite similar to the previous version with some minor adjustments and a changelog entry. Image and friends are still using DeprecatedArray/DeprecatedByteArray. Because of this, in CachedImage I had to copy from a Vector to a DeprecatedByteArray which I am worried is going to pretty bad performance wise. However, when the Image classes change to a Vector based byte buffer, the problem should go away.
Maciej Stachowiak
Comment 5
2006-04-03 15:12:08 PDT
We would need to ensure that this does not cause a performance regression.
Eric Seidel (no email)
Comment 6
2006-04-19 04:02:24 PDT
Comment on
attachment 7488
[details]
patch 3 I haven't forgotten you. But we can't land this w/o performance testing, which I just haven't taken the time to do yet.
Dave Hyatt
Comment 7
2006-04-24 17:55:33 PDT
Comment on
attachment 7488
[details]
patch 3 I worked very hard to remove extra copies of the image data, so re-introducing one now is something we should avoid.
Sam Weinig
Comment 8
2006-04-25 15:55:06 PDT
Created
attachment 7964
[details]
patch the fourth This version does not include the changes to the caching/loading classes that caused the expensive copying.
Sam Weinig
Comment 9
2006-05-02 12:15:47 PDT
Created
attachment 8078
[details]
patch for image and caching classes This patch is changes just the Image and caching classes to use Vector instead of DeprecatedArray. In order to not make any unecessary copies, some changes were made so that the data for an image is buffered directly into an internal buffer in the Image object.
Dave Hyatt
Comment 10
2006-05-07 15:09:42 PDT
Comment on
attachment 8078
[details]
patch for image and caching classes This one looks fine to me coding-wise. Please fix the misspellings of the word "received" though. "i" before "e" except after "c". :)
Dave Hyatt
Comment 11
2006-05-07 15:12:01 PDT
Comment on
attachment 7964
[details]
patch the fourth Do Vectors ever shrink their capacities when you remove items or clear? In some cases the old DeprecatedArrays are deliberately designed to never shrink, so I want to make sure Vector has the same behavior.
Dave Hyatt
Comment 12
2006-05-07 15:14:30 PDT
Comment on
attachment 7964
[details]
patch the fourth If Vectors don't shrink capacity on clear, then this patch also changes behavior (which may or may not be ok). For example in HTMLSelectElement: - m_listItems.resize(0); + m_listItems.clear(); The old code would actually re-shrink the array back down to 0. The new code may retain a large capacity (which could in fact be better for performance in this case, but is a change in behavior). These patches will definitely need to be performance-tested with all the benchmarks (our internal PLT, i-bench, and the 24fun JS test).
Dave Hyatt
Comment 13
2006-05-07 15:17:26 PDT
Comment on
attachment 7964
[details]
patch the fourth The other thing that you should double-check is to make sure none of these DeprecatedArrays were being copied. DeprecatedArrays = cheap to copy. Vectors = expensive to copy. r=me. (I'll + the other patch once the "recieved" typo is fixed.)
Sam Weinig
Comment 14
2006-05-09 19:55:48 PDT
Created
attachment 8195
[details]
updated image and caching patch Fixed spelling mistakes and updated to use wtf instead of KXMLCore.
Dave Hyatt
Comment 15
2006-05-11 14:23:01 PDT
Comment on
attachment 8195
[details]
updated image and caching patch r=me, can just land these two patches together now!
Darin Adler
Comment 16
2006-06-11 10:45:15 PDT
I'm working on landing this.
Darin Adler
Comment 17
2006-06-11 18:16:17 PDT
Committed revision 14816.
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