[Webkit-unassigned] [Bug 66135] CSSMutableStyleDeclaration should not add a property if there is already a existing same property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 16 00:15:57 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66135





--- Comment #4 from Johnny(Jianning) Ding <jnd at chromium.org>  2011-08-16 00:15:56 PST ---
Created an attachment (id=104012)
 --> (https://bugs.webkit.org/attachment.cgi?id=104012&action=review)
pathological example

(In reply to comment #3)
> You'd need to demonstrate that this affects performance.  Do you have a pathological example?

Yes, I have written a example test which is bases on a indexeddb layout test. The example is to open a database, write thousands records into the database and read them out.
Since the example will generate lots of outputs into the page, to reduce the layout cost, the output visibility is controlled by a display flag (see parameter "isDisplay" in method "output"), most of calls of output set "none" to the display property of two panels until test finished (at that time, the display is set to default). So this example test actually sets same value to panels's display property thousands of times, it may trigger thousands of style recalculation which should be unnecessary.

When running the example test by clicking "run test" button with and without the patch (provided later), you can see the around 10% percent improvement when skipping processing the redundant style changes.

I understand it may have less impact in real world on desktops, but I personally think it still worth doing and may have visible improvement the mobile device.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list