Reviewed by Darin.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Nov 2004 06:08:15 +0000 (06:08 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Nov 2004 06:08:15 +0000 (06:08 +0000)
        - fixed <rdar://problem/3886042> should save history file as binary XML so serialization,
        parsing, reading and writing is faster

        * History.subproj/WebHistory.m:
        (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
        convert dictionary to binary data before saving

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8046 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/History.subproj/WebHistory.m

index 44e60fb..5d956d9 100644 (file)
@@ -1,3 +1,14 @@
+2004-11-18  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Darin.
+        
+        - fixed <rdar://problem/3886042> should save history file as binary XML so serialization, 
+        parsing, reading and writing is faster
+
+        * History.subproj/WebHistory.m:
+        (-[WebHistoryPrivate _saveHistoryGuts:URL:error:]):
+        convert dictionary to binary data before saving
+
 2004-11-18  Chris Blumenberg  <cblu@apple.com>
 
         * WebView.subproj/WebHTMLRepresentation.m:
index d311e4e..28566e5 100644 (file)
@@ -478,7 +478,8 @@ NSString *DatesArrayKey = @"WebHistoryDates";
         array, DatesArrayKey,
         [NSNumber numberWithInt:currentFileVersion], FileVersionKey,
         nil];
-    if (![dictionary writeToURL:URL atomically:YES]) {
+    NSData *data = [NSPropertyListSerialization dataFromPropertyList:dictionary format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
+    if (![data writeToURL:URL atomically:YES]) {
         ERROR("attempt to save %@ to %@ failed", dictionary, URL);
         return NO;
     }