Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: Doing what you suggest, the timing for function calls using setInterval is just awful slow why????? Date: Sun, 1 Nov 2020 21:22:33 +0100 Lines: 15 Message-ID: References: <5189ddb2-f717-40ed-8ab7-d58f84427d8eo@googlegroups.com> <2ed575bd-296e-43df-92ab-09265c196d8bo@googlegroups.com> <84d6ebe8-9a2c-4d91-875f-54f98b5e27b8o@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net z4jYP7cp9eNeSZgT09fgvgLBje0HkcFy76AdP4gYqIHoi66DMb Cancel-Lock: sha1:LGDPZsVVar1+Ek+Z03W7DpURRJs= In-Reply-To: <84d6ebe8-9a2c-4d91-875f-54f98b5e27b8o@googlegroups.com> Xref: csiph.com comp.lang.javascript:39094 Jonas Thörnvall: [...] > I do not know how Javascript resolving it being single threaded, but i slightly remember some technic called polling. It seem javascript polling tecknic to UI maybe do to many calls out? I could accept a hundred times slower, like polling values every 1/100 of second but 1000 to 100 000 times slower seem ridiculous. "Polling" means to actively read values instead of reacting to an event or message. And yes, JavaScript can "poll" values from the UI very fast. However: setInterval() will *not* work with 0ms. The delay will usually be limited to a minium value as it makes no sense to constantly fire an event handler without any delay. -- Arno Welzel https://arnowelzel.de