[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:09:39 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 8c95887bc60d3d178be5f1e41025c3d1ad827c9a
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 6 01:48:38 2003 +0000
Reviewed by John.
- fixed 3475092 - Notifying the bridge about duplicate images takes 13% of time on intel page
Another 15% speedup on the intel page.
This also results in a 3% speedup on cvs-base PLT! (or maybe that was my last change)
* kwq/KWQLoader.mm:
(KWQServeRequest): Note that we told the bridge about the load.
(KWQCheckCacheObjectStatus): Don't tell the bridge about the load
if we have alrady; if we do tell it, then note it down.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::didTellBridgeAboutLoad): Helper method for the above.
(KWQKHTMLPart::haveToldBridgeAboutLoad): Ditto.
(KWQKHTMLPart::clear): Clear our idea of what URLs we told the bridge about.
* khtml/khtml_part.h: make clear() virtual.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 89aeb42..69f4a80 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2003-11-05 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by John.
+
+ - fixed 3475092 - Notifying the bridge about duplicate images takes 13% of time on intel page
+
+ Another 15% speedup on the intel page.
+
+ This also results in a 3% speedup on cvs-base PLT! (or maybe that was my last change)
+
+ * kwq/KWQLoader.mm:
+ (KWQServeRequest): Note that we told the bridge about the load.
+ (KWQCheckCacheObjectStatus): Don't tell the bridge about the load
+ if we have alrady; if we do tell it, then note it down.
+ * kwq/KWQKHTMLPart.h:
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::didTellBridgeAboutLoad): Helper method for the above.
+ (KWQKHTMLPart::haveToldBridgeAboutLoad): Ditto.
+ (KWQKHTMLPart::clear): Clear our idea of what URLs we told the bridge about.
+ * khtml/khtml_part.h: make clear() virtual.
+
2003-11-05 Darin Adler <darin at apple.com>
* WebCore-combined.exp: Checked in generated file.
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 4dd2526..b226b53 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -1054,7 +1054,7 @@ private:
void init( KHTMLView *view, GUIProfile prof );
- void clear();
+ virtual void clear();
bool scheduleScript( const DOM::Node &n, const QString& script);
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index 67ca973..0a631a1 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -35,6 +35,7 @@
#import "WebCoreKeyboardAccess.h"
#include <CoreFoundation/CoreFoundation.h>
+#include "KWQDict.h"
class KHTMLPartPrivate;
class KWQWindowWidget;
@@ -88,6 +89,8 @@ public:
KWQKHTMLPart();
~KWQKHTMLPart();
+ void clear();
+
void setBridge(WebCoreBridge *p);
WebCoreBridge *bridge() const { return _bridge; }
void setView(KHTMLView *view);
@@ -235,6 +238,10 @@ public:
WebCoreKeyboardUIMode keyboardUIMode() const;
void setName(const QString &name);
+
+ void didTellBridgeAboutLoad(const QString &urlString);
+ bool haveToldBridgeAboutLoad(const QString &urlString);
+
private:
virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
virtual void khtmlMouseDoubleClickEvent(khtml::MouseDoubleClickEvent *);
@@ -282,10 +289,12 @@ private:
static QPtrList<KWQKHTMLPart> &mutableInstances();
KWQWindowWidget *_windowWidget;
-
+
bool _usesInactiveTextBackgroundColor;
bool _showsFirstResponder;
+ QDict<char> urlsBridgeKnowsAbout;
+
friend class KHTMLPart;
};
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index bcd2728..11bdf4b 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -2713,3 +2713,21 @@ void KWQKHTMLPart::setName(const QString &name)
[_bridge didSetName:n.getNSString()];
KWQ_UNBLOCK_EXCEPTIONS;
}
+
+
+void KWQKHTMLPart::didTellBridgeAboutLoad(const QString &urlString)
+{
+ urlsBridgeKnowsAbout.insert(urlString, (char *)1);
+}
+
+
+bool KWQKHTMLPart::haveToldBridgeAboutLoad(const QString &urlString)
+{
+ return urlsBridgeKnowsAbout.find(urlString) != 0;
+}
+
+void KWQKHTMLPart::clear()
+{
+ urlsBridgeKnowsAbout.clear();
+ KHTMLPart::clear();
+}
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 3347c8a..1ece98f 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -47,7 +47,10 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
request->m_docLoader->part()->baseURL().url().latin1(),
request->object->url().string().latin1());
- WebCoreBridge *bridge = static_cast<KWQKHTMLPart *>(request->m_docLoader->part())->bridge();
+ KWQKHTMLPart *part = static_cast<KWQKHTMLPart *>(request->m_docLoader->part());
+ WebCoreBridge *bridge = part->bridge();
+
+ part->didTellBridgeAboutLoad(request->object->url().string());
KWQ_BLOCK_EXCEPTIONS;
KWQResourceLoader *resourceLoader = [[KWQResourceLoader alloc] initWithLoader:loader job:job];
@@ -94,13 +97,22 @@ void KWQCheckCacheObjectStatus(DocLoader *loader, CachedObject *cachedObject)
ASSERT(cachedObject->response());
// Notify the caller that we "loaded".
- WebCoreBridge *bridge = static_cast<KWQKHTMLPart *>(loader->part())->bridge();
- CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
- KWQ_BLOCK_EXCEPTIONS;
- [bridge objectLoadedFromCacheWithURL:KURL(cachedObject->url().string()).getNSURL()
- response:(id)cachedObject->response()
- size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
- KWQ_UNBLOCK_EXCEPTIONS;
+ KWQKHTMLPart *part = static_cast<KWQKHTMLPart *>(loader->part());
+
+ QString urlString = cachedObject->url().string();
+
+ if (!part->haveToldBridgeAboutLoad(urlString)) {
+ WebCoreBridge *bridge = part->bridge();
+ CachedImage *cachedImage = dynamic_cast<CachedImage *>(cachedObject);
+
+ KWQ_BLOCK_EXCEPTIONS;
+ [bridge objectLoadedFromCacheWithURL:KURL(cachedObject->url().string()).getNSURL()
+ response:(id)cachedObject->response()
+ size:cachedImage ? cachedImage->dataSize() : cachedObject->size()];
+ KWQ_UNBLOCK_EXCEPTIONS;
+
+ part->didTellBridgeAboutLoad(urlString);
+ }
}
void KWQRetainResponse(void *response)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list