W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

Optimize setting textContent?

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 08 Feb 2012 14:47:25 +0100
To: www-dom@w3.org
Cc: "Robert O'Callahan" <robert@ocallahan.org>, "Stig Halvorsen" <stighal@opera.com>
Message-ID: <op.v9c4lbbv64w2qv@annevk-macbookpro.local>
In https://bugzilla.mozilla.org/show_bug.cgi?id=725221 roc (cc'd, not  
subscribed to the list) suggests optimizing textContent by special casing  
the scenario where the first child is a text node and the string being set  
is non-empty. This would affect mutation observers and makes the setting  
algorithm more complicated, but it is also a performance win (in some  
implementations at least). Opinions?

Anne van Kesteren
Received on Wednesday, 8 February 2012 13:50:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:41 UTC