[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:15:55 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bf53f40f9fbb0844d35d6e5d1317d6c984234730
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 17 19:05:57 2002 +0000

    WebKit:
    
    	- to help with performance of various bookmark operations,
    	added a call that returns the internal array of children,
    	to complement the safer call that returns a copy.
    
            Reviewed by Darin
    
            * Bookmarks.subproj/WebBookmark.h:
    	commented -children and new -rawChildren
            * Bookmarks.subproj/WebBookmark.m:
            (-[WebBookmark rawChildren]):
    	new method, returns nil at this level.
            (-[WebBookmark contentMatches:]):
    	use -rawChildren instead of -children
    
            * Bookmarks.subproj/WebBookmarkList.m:
            (-[WebBookmarkList rawChildren]):
    	new method, returns internal array without copying
    
    WebBrowser:
    
    	- fixed 3129823 -- displaying many bookmarks in outline view is very slow
    
    	Deployed new rawChildren call everywhere appropriate in WebBrowser. This
    	prevents a lot of array-creation. On my machine, the time it takes to
    	display a folder containing 1000 items went from 0.96 sec to 0.0084 sec.
    
            Reviewed by Darin
    
            * BookmarksController.m:
            (-[BookmarksController addChildrenOfBookmark:toMenu:]):
            (-[BookmarksController goToNthFavoriteLeaf:]):
            (-[BookmarksController _addBookmarksToMenu]):
            (-[BookmarksController mergeBookmarksFrom:to:]):
            (-[BookmarksController mergeBuiltInBookmarksIfNecessary]):
            (-[BookmarksController importInternetExplorerFavorites]):
            (-[BookmarksController updateBookmarkSources]):
            (-[BookmarksController favoriteBookmarks]):
            (-[BookmarksController addFavoriteBookmark:atIndex:]):
            (-[BookmarksController recursivelyAddChildFoldersOf:toMenu:withIndentationLevel:]):
    	use -rawChildren instead of -children
    
            * BookmarksViewController.m:
            (-[BookmarksViewController newContentItemWithTitle:URLString:type:positionIgnoresSelection:]):
    	use -rawChildren instead of -children
            (-[BookmarksViewController bookmarkSources]):
    	use -rawChildren instead of -children
            (-[BookmarksViewController refreshContents]):
    	log timing
            (-[BookmarksViewController canRemoveBookmarkSource:]):
    	use -rawChildren instead of -children
            (-[BookmarksViewController deleteSelectedContentItems]):
    	log timing
            (-[BookmarksViewController child:ofContentItem:usingSource:]):
    	use -rawChildren instead of -children
            (-[BookmarksViewController outlineView:validateDrop:proposedItem:proposedChildIndex:]):
    	use -rawChildren instead of -children
            (-[BookmarksViewController paste:]):
    	log timing; use -rawChildren instead of -children
            (-[BookmarksViewController initWithBookmark:bookmark:]):
    	use -rawChildren instead of -children
    
            (+[CompletionController _addBookmarkTree:]):
    	use -rawChildren instead of -children
            (+[CompletionController _removeBookmarkTree:]):
    	use -rawChildren instead of -children
    
            * FavoriteButton.m:
            (-[FavoriteButton _contentsMenu]):
    	use -rawChildren instead of -children
    
            * WebBrowser.pbproj/project.pbxproj: version wars
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3101 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Bookmarks.subproj/WebBookmark.h b/WebKit/Bookmarks.subproj/WebBookmark.h
index c41c5c2..71ca9cf 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.h
+++ b/WebKit/Bookmarks.subproj/WebBookmark.h
@@ -52,8 +52,15 @@ typedef enum {
 - (void)setIdentifier:(NSString *)identifier;
 
 // Array of child WebBookmarks. Returns nil if bookmarkType is not WebBookmarkTypeList.
+// This creates a copy of the internal data structure, and thus is safe to (for example),
+// iterate through, removing items from their parent as you go.
 - (NSArray *)children;
 
+// Array of child WebBookmarks. Returns nil if bookmarkType is not WebBookmarkTypeList.
+// This returns the internal data structure itself. This array should not be modified,
+// and operations that alter the children of this bookmark will affect the contents of this array.
+- (NSArray *)rawChildren;
+
 // Number of children. Returns 0 if bookmarkType is not WebBookmarkTypeList.
 - (unsigned)numberOfChildren;
 
diff --git a/WebKit/Bookmarks.subproj/WebBookmark.m b/WebKit/Bookmarks.subproj/WebBookmark.m
index c396143..b06d92b 100644
--- a/WebKit/Bookmarks.subproj/WebBookmark.m
+++ b/WebKit/Bookmarks.subproj/WebBookmark.m
@@ -87,6 +87,11 @@
     return nil;
 }
 
+- (NSArray *)rawChildren
+{
+    return nil;
+}
+
 - (unsigned)numberOfChildren
 {
     return 0;
@@ -220,8 +225,8 @@
 
     unsigned childIndex;
     for (childIndex = 0; childIndex < thisCount; ++childIndex) {
-        NSArray *theseChildren = [self children];
-        NSArray *thoseChildren = [otherBookmark children];
+        NSArray *theseChildren = [self rawChildren];
+        NSArray *thoseChildren = [otherBookmark rawChildren];
         if (![[theseChildren objectAtIndex:childIndex] contentMatches:[thoseChildren objectAtIndex:childIndex]]) {
             return NO;
         }
diff --git a/WebKit/Bookmarks.subproj/WebBookmarkList.m b/WebKit/Bookmarks.subproj/WebBookmarkList.m
index c14bea6..3670717 100644
--- a/WebKit/Bookmarks.subproj/WebBookmarkList.m
+++ b/WebKit/Bookmarks.subproj/WebBookmarkList.m
@@ -172,6 +172,11 @@
     return [NSArray arrayWithArray:_list];
 }
 
+- (NSArray *)rawChildren
+{
+    return _list;
+}
+
 - (unsigned)numberOfChildren
 {
     return [_list count];
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 551b647..cc14f74 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-12-17  John Sullivan  <sullivan at apple.com>
+
+	- to help with performance of various bookmark operations,
+	added a call that returns the internal array of children,
+	to complement the safer call that returns a copy.
+
+        Reviewed by Darin
+
+        * Bookmarks.subproj/WebBookmark.h:
+	commented -children and new -rawChildren
+        * Bookmarks.subproj/WebBookmark.m:
+        (-[WebBookmark rawChildren]):
+	new method, returns nil at this level.
+        (-[WebBookmark contentMatches:]):
+	use -rawChildren instead of -children
+
+        * Bookmarks.subproj/WebBookmarkList.m:
+        (-[WebBookmarkList rawChildren]):
+	new method, returns internal array without copying
+
 2002-12-16  Darin Adler  <darin at apple.com>
 
         Reviewed by Don and Maciej.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list