473,395 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

buffor of IE


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?

Jan 27 '07 #1
4 1316
Sebastian ¯elazny wrote:
"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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jan 27 '07 #2
In comp.lang.javascript message <ep***********@news2.ipartners.pl>, Sat,
27 Jan 2007 14:23:31, =?iso-8859-2?Q?Sebastian_=AFelazny?= <ze***@op.pl>
posted:
>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.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Jan 28 '07 #3
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:)
Jan 28 '07 #4
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?

Jan 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maq | last post by:
What I must to change in: #include <vector> #include <_str.h> #include <stdio.h> #include <ctype.h> void f_1(int a, int b) { printf ("f_1\n"); printf ("%d",b); scanf ("%d",&a);
10
by: VictorG | last post by:
Hello, I am new to JS and am trying to add some HTML into a JS function. So that when called the script as well as the HTML will be invoked. Is there some type of embed mechanism, sort of the...
1
by: Woojtos | last post by:
Hi, I have a problem. I don't know how to create lowpass, highpass and bandpass filter. I capture the sound using CaptureBuffer from DirectX library. Then I create memory buffor as follow: ...
24
by: Mark | last post by:
hi, all i want is a simple function that takes an int, and returns a char* so i tried char * itoa(int i) { char buff; return _itoa(i,buff,10); }
8
by: Piotr S. | last post by:
What's wrong in following program: #include <stdio.h> #include <stdlib.h> char s; int main() { FILE *fp, *fopen(); if(fp = fopen("plik1","r")== NULL) { printf("blad otwarcia"); exit(1);
9
by: Dr. Zharkov | last post by:
Hello. To define a name of a computer in project VS 2005 after click of Button1 on Form1, on Visual Basic such code is used: Declare Auto Function GetComputerName Lib "kernel32.dll" _ ...
4
by: Tomassus | last post by:
Hi there, I have a problem with dynamic memory allocation. I know that it would have been easier to use vectors methods, but i want to know what i do here wrong. This is one of my methods in...
17
by: mac | last post by:
Hi, I'm trying to write a fibonacci recursive function that will return the fibonacci string separated by comma. The problem sounds like this: ------------- Write a recursive function that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.