Re:In spite of an increase in Internet speed, webpage speeds...
by asddubs on Wednesday August 05, 2020 @09:27AM
(#24060507)
i think the biggest thing for your average app is just causing a lot of layout repaints. as long as you spam requestanimationframe everywhere and group style changes and polling, you'll be good. I was really surprised how good I was able to get things on even an ancient ipad 2 I had laying around
Re:In spite of an increase in Internet speed, webpage speeds...
by azangru on Tuesday August 04, 2020 @09:01PM
(#24056196)
> document.getElementById()
Can we at least do document.querySelector? Pretty please? :-)
Re:In spite of an increase in Internet speed, webpage speeds...
by snet0 on Wednesday August 05, 2020 @12:58PM
(#24062981)
Just use the 1 line jQuery:
const $ = document.querySelector.bind(document)
Re:In spite of an increase in Internet speed, webpage speeds...
by abhishekjha on Friday August 07, 2020 @03:27AM
(#24079286)
What does it do?
Javascript is actually incredibly fast on most devices, especially if you are constraining yourself to the vanilla API and not something like jQuery. Remember, every web browser's JS engine has been hyper-optimized to support decades of half-assed website implementations.
It's really hard to screw up perf on document.getElementById(). There's honestly not a whole lot of ways to hang yourself with the vanilla methods unless you are trying to build something ridiculous like a raytracer or physics engine.