News for hackers. Stuff that matters.

Chrome innerHTML massive slowness

https://code.google.com/p/chromium/issues/detail?id=230504

try the below in IE/ff/chrome

<!DOCTYPE html> <html lang="en" class="ims-lvl-1">

<head> </head>

<body id="pagewrapper" class="gainlayout yui-skin-sam ims-lvl-1">

		<form id="theForm" enctype="multipart/form-data" action="test.html" method="post">

			<input type="submit" value="Submit">
			
			<script type="text/javascript">
				var starttime = new Date().getTime();
				for (var i=0; i<100000;++i){
					var el = document.createElement('div');
					el.appendChild(document.createTextNode(''));
				}

				var endtime = new Date().getTime();
				console.log(endtime - starttime);
			</script>	
	

		<input type="hidden" name="h" value="012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">
		

		</form>
		
	
</body>

</html>

( 3 comments | on HN )
Re:Chrome innerHTML massive slowness by andreasen on Friday April 12, 2013 @01:55AM (#5536885)
We just noticed this today as the calendar control in our app suddenly became extremely slow after a postback. Using library code, which makes it a bit harder to fix.
Re:Chrome innerHTML massive slowness by balanceit on Friday April 12, 2013 @01:52AM (#5536881)
looks like we have to wait for google to sort this one out.
Re:Chrome innerHTML massive slowness by balanceit on Friday April 12, 2013 @01:59AM (#5536899)
oh and this gets much much worse the larger the form data