A sane scripting language knows this and designs in the minimal amount of "typing" necessary to ensure that you can still have easy-to-read things that a user types, but that the compiler can know definitively what they do. JavaScript fails completely here.
-
-
Replying to @cmuratori @fenomas and
Normally you'd just be like "yeah, it's a rookie mistake, it happens". Kinda like with HTML and CSS. But sadly, HTML/CSS/JS, despite all three being rookie mistakes across the board, ended up running the top of the entire world's software stack. So that's where we're at :(
0 replies 0 retweets 7 likes -
This Tweet is unavailable.
-
Replying to @fenomas @NoHatCoder and
Sigh. Since apparently nobody knows how this stuff works, I will go grab a performance capture to demonstrate :(
1 reply 0 retweets 2 likes -
Replying to @cmuratori @fenomas and
So from Chrome's perf recorder, the "recalc" time is 50ms after the script runs. If I take the script and do the optimized version, it takes ~50ms as well, so it's 50ms/50ms. If I turn up the number of things it sets, and make it set them poorly, it's 423ms/50ms.
1 reply 0 retweets 2 likes -
Replying to @cmuratori @fenomas and
And if I try to regress it all the way back to the original code that I started with, although I'm not 100% sure exactly what that looked like, it takes 2.67s/50ms. So at least as far as I can tell, the recalc time is always constant.
1 reply 0 retweets 0 likes -
Replying to @cmuratori @fenomas and
It's just how inefficiently you go about setting things. If you set a bunch of styles and look up elements poorly, and/or make function calls instead of not, etc., you can make the JavaScript take longer and longer but it's not because of the recalc.
2 replies 0 retweets 1 like -
Replying to @cmuratori @fenomas and
Since when do you do web work? What are you working on?
1 reply 0 retweets 0 likes -
Replying to @daniel_carvalho @fenomas and
I did our whole website set - CMS, frontend, and mailing list / github auth / twitch status backend (http://mollyrocket.com , http://meowtheinfinite.com , http://handmadehero.org , etc.)
1 reply 0 retweets 2 likes -
Replying to @cmuratori @fenomas and
Right, yeah. But I mean that doesn't sound like what you're describing now (the shear number of elements being updated, etc...).
1 reply 0 retweets 0 likes
Yeah that is not what I was working on at this particular moment :)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.