patches: many performance improvements

David Faure dfaure at klaralvdalens-datakonsult.se
Fri Nov 21 13:13:26 CET 2003


On Tuesday 18 November 2003 06:14, Maciej Stachowiak wrote:
> 
> Here's a bunch of patches that improve performance. I mostly developed 
> them trying to fix a particular intel.com page that was taking over 100 
> seconds to load 
> (<http://www.intel.com/cd/ids/developer/asmo-na/eng/index.htm>). But 
> some of them also improve loading performance on a wide variety of 
> pages.
> 
> 
> The first patch changes the list of clients from a list to a 
> dictionary. Because the intel page loads 10,000 copies of a particular 
> image, this makes a huge measurable performance difference by fixing 
> n^2 behavior:

Thanks for all those patches, this is really good stuff.
I'm not sure we'll be able to apply all of them before 3.2 (we're in freeze),
but for sure we'll merge the rest after 3.2.

Waldo applied the first one and found a mistake in it.
His version says:
-    m_clients.remove(c);
-    m_clients.append(c);
+    m_clients.replace(c,c);
and it should indeed be replace() instead of insert(), otherwise the QPtrDict 
will have duplicates of "c" multiple times in it (at least with the standard QPtrDict behavior ;)

Thanks,
David.

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions


More information about the Khtml-devel mailing list