Optimizing CSS removeProperty()

Harri Porten porten at froglogic.com
Mon Aug 25 08:17:10 BST 2008


Update:

On Sun, 24 Aug 2008, Harri Porten wrote:

> 1.) Provide a second justRemoveProperty() function (drawback: code 
> duplication, particularly since removeProperty() is virtual).
>
> 2.) Add a "noReturnValue" flag causing an empty string to be returned 
> (drawback: uglifying the code a bit).
>
> 3.) Drop the return value from removeProperty() from the internal 
> implementation, i.e. make it a void function and implement the public DOM API 
> in terms of a getPropertyValue() and removeProperty() pair. (drawback: would 
> slow down real removeProperty() calls. but who every calls that?).

Found a more elegant solution for the second idea (an optional 
out-parameter) and applied it:

    http://websvn.kde.org:80/?view=rev&revision=851942

Maksim got a 16.7% speedup with a release build.

Harri.




More information about the kfm-devel mailing list