[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:38:46 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 897ef267c0d40be9ca495b93fe857e873ae5d417
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon May 10 21:47:37 2004 +0000
Reviewed by Dave.
- some minor performance tweaks that together give .5% or so on
the HTML iBench
* khtml/css/css_valueimpl.h: don't use a bitfield for id and important,
unpacking the bitfield is too expensive
* kwq/KWQArrayImpl.h:
* kwq/KWQArrayImpl.mm:
(KWQArrayImpl::at): inline this method because it's so hot
* kwq/KWQString.mm:
(allocateHandle): inline this function because it's so hot
(initializeHandleNodes): move this in the file so above can be inlined
(allocateNode): ditto
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 0d074b3..f605a52 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2004-05-08 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Dave.
+
+ - some minor performance tweaks that together give .5% or so on
+ the HTML iBench
+
+ * khtml/css/css_valueimpl.h: don't use a bitfield for id and important,
+ unpacking the bitfield is too expensive
+ * kwq/KWQArrayImpl.h:
+ * kwq/KWQArrayImpl.mm:
+ (KWQArrayImpl::at): inline this method because it's so hot
+ * kwq/KWQString.mm:
+ (allocateHandle): inline this function because it's so hot
+ (initializeHandleNodes): move this in the file so above can be inlined
+ (allocateNode): ditto
+
2004-05-10 David Hyatt <hyatt at apple.com>
Move image loading to content.
@@ -51,6 +68,7 @@
building with a case sensitive file system. I could have changed this to "qcstring.h",
but it seemed better to use the header's real name since we're inside KWQ here.
+>>>>>>> 1.2754
2004-05-07 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dave.
diff --git a/WebCore/khtml/css/css_valueimpl.h b/WebCore/khtml/css/css_valueimpl.h
index f0ae93d..6549185 100644
--- a/WebCore/khtml/css/css_valueimpl.h
+++ b/WebCore/khtml/css/css_valueimpl.h
@@ -389,8 +389,8 @@ public:
DOM::DOMString cssText() const;
// make sure the following fits in 4 bytes.
- int m_id : 30;
- bool m_bImportant : 1;
+ int m_id;
+ bool m_bImportant;
protected:
CSSValueImpl *m_value;
diff --git a/WebCore/kwq/KWQArrayImpl.h b/WebCore/kwq/KWQArrayImpl.h
index f144cef..204fd0d 100644
--- a/WebCore/kwq/KWQArrayImpl.h
+++ b/WebCore/kwq/KWQArrayImpl.h
@@ -39,7 +39,8 @@ class KWQArrayImpl
KWQArrayImpl(const KWQArrayImpl &);
KWQArrayImpl &operator=(const KWQArrayImpl &);
- void *at(size_t pos) const;
+ void *at(size_t pos) const { return &d->data[pos * d->itemSize]; }
+
void *data() const;
uint size() const;
bool resize(size_t size);
@@ -48,7 +49,16 @@ class KWQArrayImpl
bool operator==(const KWQArrayImpl &) const;
private:
- class KWQArrayPrivate;
+ class KWQArrayPrivate
+ {
+ public:
+ KWQArrayPrivate(size_t pNumItems, size_t pItemSize);
+ ~KWQArrayPrivate();
+ size_t numItems;
+ size_t itemSize;
+ char *data;
+ int refCount;
+ };
KWQRefPtr<KWQArrayPrivate> d;
};
diff --git a/WebCore/kwq/KWQArrayImpl.mm b/WebCore/kwq/KWQArrayImpl.mm
index bee2377..0bb270a 100644
--- a/WebCore/kwq/KWQArrayImpl.mm
+++ b/WebCore/kwq/KWQArrayImpl.mm
@@ -32,17 +32,6 @@
using std::nothrow;
-class KWQArrayImpl::KWQArrayPrivate
-{
-public:
- KWQArrayPrivate(size_t pNumItems, size_t pItemSize);
- ~KWQArrayPrivate();
- size_t numItems;
- size_t itemSize;
- char *data;
- int refCount;
-};
-
KWQArrayImpl::KWQArrayPrivate::KWQArrayPrivate(size_t pItemSize, size_t pNumItems) :
numItems(pNumItems),
itemSize(pItemSize),
@@ -77,11 +66,6 @@ KWQArrayImpl &KWQArrayImpl::operator=(const KWQArrayImpl &a)
return *this;
}
-void *KWQArrayImpl::at(size_t pos) const
-{
- return &d->data[pos * d->itemSize];
-}
-
void *KWQArrayImpl::data() const
{
return d->data;
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 042cf25..799a7c2 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -219,7 +219,36 @@ void _printQStringAllocationStatistics()
#import <mach/vm_map.h>
#import <mach/mach_init.h>
-static KWQStringData **allocateHandle();
+struct HandleNode;
+struct HandlePageNode;
+
+static HandleNode *allocateNode(HandlePageNode *pageNode);
+static HandlePageNode *allocatePageNode();
+
+static HandlePageNode *usedNodeAllocationPages = 0;
+static HandlePageNode *freeNodeAllocationPages = 0;
+
+static inline void initializeHandleNodes()
+{
+ if (freeNodeAllocationPages == 0)
+ freeNodeAllocationPages = allocatePageNode();
+}
+
+static inline KWQStringData **allocateHandle()
+{
+#if CHECK_FOR_HANDLE_LEAKS
+ return static_cast<KWQStringData **>(malloc(sizeof(KWQStringData *)));
+#endif
+
+ initializeHandleNodes();
+
+#ifdef QSTRING_DEBUG_ALLOCATIONS
+ handleInstances++;
+#endif
+
+ return reinterpret_cast<KWQStringData **>(allocateNode(freeNodeAllocationPages));
+}
+
static void freeHandle(KWQStringData **);
#define IS_ASCII_QCHAR(c) ((c).unicode() > 0 && (c).unicode() <= 0xff)
@@ -2851,9 +2880,6 @@ struct HandleNode {
} type;
};
-static HandlePageNode *usedNodeAllocationPages = 0;
-static HandlePageNode *freeNodeAllocationPages = 0;
-
#if 1 // change to 0 to do the page lists checks
#define CHECK_PAGE_LISTS() ((void)0)
@@ -2926,12 +2952,6 @@ static HandlePageNode *allocatePageNode()
return node;
}
-static inline void initializeHandleNodes()
-{
- if (freeNodeAllocationPages == 0)
- freeNodeAllocationPages = allocatePageNode();
-}
-
static HandleNode *allocateNode(HandlePageNode *pageNode)
{
CHECK_PAGE_LISTS();
@@ -2974,21 +2994,6 @@ static HandleNode *allocateNode(HandlePageNode *pageNode)
return allocated;
}
-KWQStringData **allocateHandle()
-{
-#if CHECK_FOR_HANDLE_LEAKS
- return static_cast<KWQStringData **>(malloc(sizeof(KWQStringData *)));
-#endif
-
- initializeHandleNodes();
-
-#ifdef QSTRING_DEBUG_ALLOCATIONS
- handleInstances++;
-#endif
-
- return reinterpret_cast<KWQStringData **>(allocateNode(freeNodeAllocationPages));
-}
-
void freeHandle(KWQStringData **_free)
{
#if CHECK_FOR_HANDLE_LEAKS
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list