///js file name dprocess.js

//Array view
//Author Darxx
function debug(array,type) {var elements = array.length;if (type ==
'write') { var br = '<br/>&nbsp;&nbsp;&nbsp;'; }if (type == 'alert')
{ var br = "\n"; }var out = "Array {"+br+br;if (elements) {for(i = 0;i
< elements;i++) {out+= "\t["+i+"] = "+array[i]+br;}out+= br+"}";}if
(type == 'write') {document.write(out); }if (type == 'alert') {alert
(out);}}

//clear array
//Author Darxx
function clearArray(array) { if (array) {var elements =
array.length;var outArray = new Array();var id = 0;if (elements) {for
(i = 0; i < elements;i++) {if (array[i] && array[i] != "none")
{  outArray[id] = array[i]; id++; }}return outArray;}}}

//masyvo funkcinio elemento naikinimas
//autor Darxx
var x = 0; //masyvo elemento numeris
var process = new Array();

//ciklas kas 3 sekundes sukuriamas masyvo elementas kuris nesha
funkcija
function testtimeout(){
        process[x] = setTimeout("testtimeout()",1);
        document.title = 'Process list '+x;
        x = x+1;
}
//sustabdyti ciklus
function stoper() {
        if (process.length > 0) {
                process = clearArray(process);
                if (process) { debug(process,'alert'); }
                killall(process,x);
        }
}

//nuzudyti ciklus ir procesus kuriuos jis nesha
function killall(array,id) {
        if (array) {
        var elements = array.length;
        if (elements) {
                for(i = 0;i < elements;i++) {
                        clearTimeout(array[i]);
                }
        }
        process = new Array();
        alert('Success Master');
        x = 0;
        document.title = 'Process list '+x;
        }
}


//html
<html>
<head>
<title>Process Kill</title>
</head>

<script type="text/javascript" src="js/dprocess.js"></script>



<form name=xcv>
<input type=button onClick="testtimeout()" value=start>
<input type=button onClick="stoper()" value=stop>
</form>

Test on chrome very slow and no stability
Firefox Fast
Safary Fast
Ie Slow but stable not like chrome

whats chromes problem?

I have suspicion that chrome works slow with big html files to


--~--~---------~--~----~------------~-------~--~----~
Chromium Discussion mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to