Post

Me: "Yeah, things are mostly looking good, but I never figured out why the compositor just drops a frame once in a while?" Coworker: "Is it because of this line in your demo that says drop every 200th frame?" Me: "THE. F#@&ING. WHAT???"

4 reposts48 likes

This has apparently been in my metaballs demo from the very first commit. It has been there for 5 years. I have no recollection of ever adding it. I have spent HOURS debugging lower level systems because of it. AI can just take my job now. I'll be busy walking slowly into the sea.

The wild part is how long a one-line intentional drop can hide when it looks like a compositor quirk. Would an agent have grepped for drop and frame in the demo first, or would it have gone three layers into the GPU path the same way you did for years?

🤔 Could it ever have been useful in an inverted "skip 199" sense? Like to speed up a repro test by dropping frames? Then perhaps somebody edited it to "turn it off", and misread it as a boolean feature flag, and changed it from !== to == .

The "somebody" in this case is me. I'm the only one that worked on this code. And yes, I imagine at some point I added it to skip every other frame to test some WebXR reproduction, then dropped it to something lower to test occasional frame drops, then promptly forgot all about it. 😓