buffor of IE

S

Sebastian ¯elazny

Hi,

I have problem, becose my function searching a very big file and when I'm
start this function for IE, I saw message:

"A Script on this page is causing Internet Explorer to run slowly. If it
continues to run, your computer may become unresponsive.

Do ypu want to abort the script?"

What can I do?
 
M

Martin Honnen

Sebastian said:
"A Script on this page is causing Internet Explorer to run slowly. If it
continues to run, your computer may become unresponsive.

Do ypu want to abort the script?"

What can I do?

You might need to break up the script e.g. into two or more functions
where you call the first function and then have it call the second with
setTimeout e.g.
function f1 () {
// do some stuff here
setTimeout('f2();', 5);
}
function f2 () {
// do remaining stuff here
}
f1();
That can help to avoid that dialog.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>, Sat,
I have problem, becose my function searching a very big file
...
What can I do?

Ensure that your search function is as efficient as possible.

for (J=0 ; J<VBF.length ; J++)
if (VBF.substr(J, Find.length) == Find) break ;

is about as inefficient as I can readily think of.

Boyer-Moore and Boyer–Moore–Horspool (Wiki) are efficient.

It's a good idea to read the newsgroup and its FAQ. See below.
 
S

Sebastian ¯elazny

You might need to break up the script e.g. into two or more functions
where you call the first function and then have it call the second with
setTimeout e.g.
function f1 () {
// do some stuff here
setTimeout('f2();', 5);
}
function f2 () {
// do remaining stuff here
}
f1();
That can help to avoid that dialog.

Thanks Martin. Is work:)
 
S

Sebastian ¯elazny

function f1 () {
// do some stuff here
setTimeout('f2();', 5);
}
function f2 () {
// do remaining stuff here
}
f1();

I have a secend quastion becose I send a object in argument on function
f2(arg). And setTimeout is not working for object:( Do you have another
idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top