Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #39107
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? |
| Date | 2020-11-02 11:37 +0100 |
| Message-ID | <i0a5qfF52nrU1@mid.individual.net> (permalink) |
| References | (5 earlier) <a91f9849-21a2-499e-abf5-15408b0d6dd2o@googlegroups.com> <i08j0eFpi7mU2@mid.individual.net> <2c544c3a-2dea-472e-87cb-9578fd09072bo@googlegroups.com> <i0914uFsckrU2@mid.individual.net> <ef2a736b-6fbf-4e97-b44e-c5c8ea86b7f4o@googlegroups.com> |
Jonas Thörnvall: [...] > Yeah... So how did you mean i should use setTimeout and setInterval. You should not do anything just because someone tells you to do so. First you should understand what an event driven UI is and that JavaScript is not multithreaded. If your application needs to do something periodically but also should handle user input, you have only two choices in JavaScript: Use setInterval() or setTimeout() to keep things going by calling some function which keeps the background stuff running by executing only one thing at a time for each timer trigger so the browser still can pass events to the event handlers. As in <https://arnowelzel.de/en/projects/example-for-webgl> there is an animation running constantly but at the same time user input is possible as well to enable full screen view or stop and reset the animation. OR: Use workers (see <https://developer.mozilla.org/en-US/docs/Web/API/Worker>) to start a script as background process. -- Arno Welzel https://arnowelzel.de
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-10-31 13:26 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-10-31 13:37 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-10-31 13:41 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-10-31 13:54 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-10-31 17:51 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? luserdroog <luser.droog@gmail.com> - 2020-10-31 23:43 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 00:18 -0700
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-01 13:47 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 09:11 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 09:15 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 09:21 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-11-01 09:52 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 11:27 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 11:33 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-11-01 15:42 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-11-08 23:36 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Silvio <silvio@internet.com> - 2020-11-09 17:01 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 11:37 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-01 21:17 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 14:08 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-02 01:09 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-01 21:09 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 14:07 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-02 01:11 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 16:18 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-02 11:37 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 09:28 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-01 21:22 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 14:10 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-02 01:04 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-01 16:16 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Arno Welzel <usenet@arnowelzel.de> - 2020-11-02 11:40 +0100
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2020-11-11 00:21 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-11-11 09:13 -0800
Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-11-01 16:19 -0800
csiph-web