Maximum execution time for JavaScript

后端 未结 3 1254
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 02:53

I know both ie and firefox have limits for javascript execution (Source 1, Source 2). Based on number of statements executed, I heard it was 5 million somewhere in IE and ba

3条回答
  •  爱一瞬间的悲伤
    2020-12-16 03:24

    I too stuck in this kind of JS error. I also get the solution, unfortunately only for IE, which tells to edit the registry (regedit command) and update the number of JS commands to allow. Read more here http://support.microsoft.com/?kbid=175500.

    But this doesn't seems to be a good solution to me bcoz if you are developing a web application you can not ask every user to use only IE and update his system registry.

    As a workaround: If your data to process at client end is really large then you can put some manual delays between fix set of events processing. For ex. If there are 100 events of any task you want to process then you can break them in to 10 sets of 100 and process each of them in say 100ms. To know how to do that follow below link:

    http://www.nczonline.net/blog/2009/01/13/speed-up-your-javascript-part-1/

提交回复
热议问题