...

View Full Version : Please, tell me how many resources this code will waste



DaveyErwin
09-01-2010, 01:36 AM
<html>
<head>
<title>Waster</title>
<script>
init = function(){
setInterval(function(){
if (true){}else{new function(){for(var i = 10000;i--;)
{"Object".subString(1,2)}}}},1000);
}
</script>
</head>
<body onload=init()>

</body>
</html>
Because Im not a hardware guy
Im not sure how to measre the
wasred resouces here any help
wil get my thanks.
Only the foolishly brave should try this,
I've been told it never stops.
What a fate.

Old Pedant
09-01-2010, 01:51 AM
I think maybe the biggest waste of resources was the time you took to write that.

Aside from occupying the CPU for a few nanoseconds every second, it doesn't do anything or use any resources.

DaveyErwin
09-01-2010, 01:57 AM
I think maybe the biggest waste of resources was the time you took to write that.

Aside from occupying the CPU for a few nanoseconds every second, it doesn't do anything or use any resources.

Thank You

and
after some consideration,
well said

gizmo1650
09-01-2010, 02:15 AM
if(true){}
that will freeze your browser.

Old Pedant
09-01-2010, 02:26 AM
if(true){}
that will freeze your browser.

Ummm...oooookkkkaaaaaaaaaaaaaayyyy

DaveyErwin
09-01-2010, 03:15 AM
if(true){}
that will freeze your browser.



Ummm...oooookkkkaaaaaaaaaaaaaayyyy

well, he did snag onto the relative bit , eh ?

Old Pedant
09-01-2010, 03:26 AM
I think I will let the two of you go have a private conversation before this thread drives me crazier than I am already.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum