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

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:29:04 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit eb6cf103586500f44f87c8f91ea7fa4312628e40
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Mar 10 01:33:10 2004 +0000

    WebKit:
    
    	Made web archives use NSPropertyListBinaryFormat_v1_0 instead of NSPropertyListXMLFormat_v1_0 because NSPropertyListBinaryFormat_v1_0 is 3-5 times faster to serialize and parse.
    
            Reviewed by rjw.
    
            * WebView.subproj/WebResource.m:
            (+[WebResource _parseWebArchive:mainResource:subresources:]): add timing code
            (+[WebResource _webArchiveWithMainResource:subresources:]): add timing code, use NSPropertyListBinaryFormat_v1_0
    
    WebBrowser:
    
            Reviewed by rjw.
    
            * BrowserDocument.m:
            (-[BrowserDocument mailPageAddress:]): call [WebResource _webArchiveWithMainResource:subresources:] and let it handle the property list serialization
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6193 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 30f3410..ec6b7da 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,15 @@
 2004-03-09  Chris Blumenberg  <cblu at apple.com>
 
+	Made web archives use NSPropertyListBinaryFormat_v1_0 instead of NSPropertyListXMLFormat_v1_0 because NSPropertyListBinaryFormat_v1_0 is 3-5 times faster to serialize and parse.
+
+        Reviewed by rjw.
+
+        * WebView.subproj/WebResource.m:
+        (+[WebResource _parseWebArchive:mainResource:subresources:]): add timing code
+        (+[WebResource _webArchiveWithMainResource:subresources:]): add timing code, use NSPropertyListBinaryFormat_v1_0
+
+2004-03-09  Chris Blumenberg  <cblu at apple.com>
+
 	Fixed: <rdar://problem/3577508>: API: web archive related API's
 	Implemented WebKit side of: <rdar://problem/3144033>: ability to save web sites (images and all)
 
diff --git a/WebKit/WebView.subproj/WebResource.m b/WebKit/WebView.subproj/WebResource.m
index f748db5..fe6a0b6 100644
--- a/WebKit/WebView.subproj/WebResource.m
+++ b/WebKit/WebView.subproj/WebResource.m
@@ -4,6 +4,7 @@
 */
 
 #import <WebKit/WebResourcePrivate.h>
+#import <WebKit/WebKitLogging.h>
 #import <WebKit/WebNSURLExtras.h>
 
 #import <Foundation/NSDictionary_NSURLExtras.h>
@@ -130,10 +131,18 @@ NSString *WebSubresourcesKey =              @"WebSubresources";
 
 + (BOOL)_parseWebArchive:(NSData *)webArchive mainResource:(WebResource **)mainResource subresources:(NSArray **)subresources
 {
+#if !LOG_DISABLED
+    CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
+#endif
     NSDictionary *propertyList = [NSPropertyListSerialization propertyListFromData:webArchive 
                                                                   mutabilityOption:NSPropertyListImmutable 
                                                                             format:nil
                                                                   errorDescription:nil];
+#if !LOG_DISABLED
+    CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();
+    CFAbsoluteTime duration = end - start;
+#endif
+    LOG(Timing, "Parsing web archive with [NSPropertyListSerialization propertyListFromData::::] took %f seconds", duration);
     if ([propertyList isKindOfClass:[NSDictionary class]]) {
         NSDictionary *resourcePropertyList = [propertyList objectForKey:WebMainResourceKey];
         if (resourcePropertyList) {
@@ -155,7 +164,16 @@ NSString *WebSubresourcesKey =              @"WebSubresources";
     if ([propertyLists count] > 0) {
         [propertyList setObject:propertyLists forKey:WebSubresourcesKey];
     }
-    return [NSPropertyListSerialization dataFromPropertyList:propertyList format:NSPropertyListXMLFormat_v1_0 errorDescription:nil];
+#if !LOG_DISABLED
+    CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
+#endif
+    NSData *webArchive = [NSPropertyListSerialization dataFromPropertyList:propertyList format:NSPropertyListBinaryFormat_v1_0 errorDescription:nil];
+#if !LOG_DISABLED
+    CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();
+    CFAbsoluteTime duration = end - start;
+#endif
+    LOG(Timing, "Creating web archive with [NSPropertyListSerialization dataFromPropertyList:::] took %f seconds", duration);
+    return webArchive;
 }
 
 - (id)_initWithPropertyList:(id)propertyList

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list