/    Sign up×
Community /Pin to ProfileBookmark

does setInterval not work correctly in IE8

hello;

I have a script that uses a setinterval;

the script works on mozilla, safari ( win ), opera, IE7, but not IE8;

actually what happens in IE8 … the setinterval works but takes a very long time; my request is for 83 milliseconds, but in IE8 it takes about 15-20 seconds;

any thoughts?

thanks,
dsdsdsdsd

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@KorNov 17.2009 — Can we see the significant part of the code? have you set the delay to 83 milliseconds?
Copy linkTweet thisAlerts:
@dsdsdsdsdauthorNov 18.2009 — the js setInterval seems to be bogging down due to 2 things:

1 - a fairly heavy DHTML code

2 - a heavy flash pv3d application;


when I remove the flash pv3d, I still get a significant delay ( should ONLY be 83 milliseconds, end up with 3-4 seconds );

when I remove the rest of the html/js, and only have a generic setinterval calling a dummy function, everything works fine;

SOLUTION: I have a boolean for IE8; if IE8, then DO NOT USE the setInterval-based DHTML animation, but rather simply do a state change on HTML elements;


Mozilla, Safari, Opera are fine;

I will uninstall my IE8, and test in IE7 later today;
Copy linkTweet thisAlerts:
@jamesbcox1980Nov 18.2009 — IE8 does setInterval just fine. You're not going to get anywhere here until you post the code for us to look at.
Copy linkTweet thisAlerts:
@dsdsdsdsdauthorNov 18.2009 — jamesbcox1980, thanks for responding;

scenario A:

I mentioned in my earlier post that indeed the setInterval works fine in IE8 [B]when[/B] the webpage is stripped down;

[I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 83ms

[/I]


scenario B:

however, once I added the rest of my HTML/JS

[I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 4000ms

[/I]


scenario C:

once I added my flash papervision3 stuff

[I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 20000ms

[/I]






in Safari, Mozilla, and Opera:

scenario A:[I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 83ms

[/I]


scenario B: [I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 83ms

[/I]


scenario C: [I]QUALITATIVE benchmark: request for setInterval 83ms ==> response time 200ms

[/I]




these results seem to be in line with various posts that discuss IE8 render effeciency; ex: http://www.betanews.com/article/Security-fixes-JavaScript-update-bog-down-Internet-Explorer-8/1256917196



also, of the 4 browsers ( IE8, mozilla3.5, safari(WIN)3.1, Opera9.2 ), IE8 was many orders worse in dealing with flash when wmode='transparent';

the other 3 handled it fine from a usability standpoint, with only slightly discernible lagtime, eg 100ms; and it is true that the other 3 improved when wmode==>"window";

but IE8 went from 20000ms to 4000ms when wmode went from transparent to window;

all of these results are qualitative;
Copy linkTweet thisAlerts:
@jamesbcox1980Nov 18.2009 — The "performance" those posts are talking about is only just noticeable. It's not something that will make an application go from milliseconds to 10-20 seconds. Many times, these long waits are caused by trying to loop through an innerHTML script. But that should also cause Firefox to bog down, since IE8 and Firefox handle innerHTML about the same.... poorly (IE8 is significantly worse). Like both Kor and I said, instead of over-thinking it, just post your significant code or give us a link to the page that's having problems.

I can only make suggestions on how to fix the problem if we know exactly what you know. You may be able to search and find a fix to the issue, but with little info, there's not much we can do. You're assuming this is a known issue and that there's just some fix already out there... That may or may not be true.
Copy linkTweet thisAlerts:
@dsdsdsdsdauthorNov 18.2009 — I have uninstalled my IE8, and reverted to IE7 ... everything works fine in IE7;
Copy linkTweet thisAlerts:
@jamesbcox1980Nov 18.2009 — Lol... ok.
×

Success!

Help @dsdsdsdsd spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...