Here i want to stress test on both most popular browser in the world – Google Chrome and Firefox 3. I create a simple html code to test on both browser.

Here is the source code

<html>
<body>
<textarea id="test" cols=80 rows=50></textarea>
<br/>
<script>
var i;
for(i =0; i<10000; i++)
{
   document.getElementById("test").value += (i + " - http://www.mkyong.com\n");
}
</script>
</body>
</html>

Above code just create a textarea and append string into the textarea 10000 time. Saved it as html file and open it with FireFox 3 and Google Chrome to test it.

1. FireFox 3

Firefox 3 will hanging and display as not responding. I cant even access others tabs. It seem hanging forever , i have to use task manager to kill it manually.

Google Chrome

Google Chrome will hanging as well, however it allow me to access other tabs, Only the tab running the stress test code will not responding, other function working very well without any interruption.

After few seconds, Google Chrome seem detect something wrong in my code, it just stop the stress test code and display a user friendly error message as following

Google Chrome VS FireFox 3 – Crash Test Result

Google Chrome WON! it can handle abnormal and huge data loading very efficiently and it will stop with a friendly error message as well. While Firefox 3 just hanging there and wait me to kill it.

Actually Google Chrome is using multi-threads or multi processors concept, every single tab consider as one particular process, however all traditional browser is using single-thread concept. This is why Google Chrome can be more stable then other browser, i believe all browsers will implement this multiple thread browser idea future. Google proved itself as a leader in web standard again.

Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~