Is requestAnimationFrame really recursive?
Maybe that browser is showing you the /asynchronous call stack/
("Async Stack Traces"), not the execution stack. This async stack
seems to be a history of scheduling ancestry. The browser saved
a history of who scheduled whom.
Mikko <mikko.levanto@iki.fi> wrote or quoted:
Is requestAnimationFrame really recursive?
No, it's just scheduling a future execution.
Maybe that browser is showing you the /asynchronous call stack/
("Async Stack Traces"), not the execution stack. This async stack
seems to be a history of scheduling ancestry. The browser saved
a history of who scheduled whom.
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
Maybe that browser is showing you the /asynchronous call stack/
("Async Stack Traces"), not the execution stack. This async stack
seems to be a history of scheduling ancestry. The browser saved
a history of who scheduled whom.
It's also possible that what you see /is/ the actual call stack,
and there is some other part of the code that actually /is/
recursive. I don't have Safari here to check this out.
On 09/11/2026 15:53, Stefan Ram wrote:
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
Maybe that browser is showing you the /asynchronous call stack/
("Async Stack Traces"), not the execution stack. This async stack
seems to be a history of scheduling ancestry. The browser saved
a history of who scheduled whom.
It's also possible that what you see /is/ the actual call stack,
and there is some other part of the code that actually /is/
recursive. I don't have Safari here to check this out.
As my animation code calls requestAnimationFrame there is an indirect recursion if requestAnimationFrame is recursive. Otherwise I have no recursion that involves requestAnimationFrame.
On 2026-11-09, Mikko <mikko.levanto@iki.fi> wrote:
On 09/11/2026 15:53, Stefan Ram wrote:
ram@zedat.fu-berlin.de (Stefan Ram) wrote or quoted:
Maybe that browser is showing you the /asynchronous call stack/
("Async Stack Traces"), not the execution stack. This async stack
seems to be a history of scheduling ancestry. The browser saved
a history of who scheduled whom.
It's also possible that what you see /is/ the actual call stack,
and there is some other part of the code that actually /is/
recursive. I don't have Safari here to check this out.
As my animation code calls requestAnimationFrame there is an indirect
recursion if requestAnimationFrame is recursive. Otherwise I have no
recursion that involves requestAnimationFrame.
I'm pretty sure requestAnimationFrame is like setTimeout - it
always returns immediately, and the function you pass it is
called asynchronously at a later point.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 57:40:51 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 285,928 |