by tyingq · 7y ago · 0 comments
Notable that they avoid the iPhone comparison. It runs circles around even the top end Androids for JS performance.
2. Unless you have the Samsung SoC variant of just released Galaxy S10, pretty much all Android JS performance, including flagship, will be slower than the current entry iPhone, which is the iPhone 7.
And since the current Android flagship, along with middle range and lower end still has another 4 years of life in it, with roadmap that shows very slow improvement in the middle to low end Smartphones. May be we should just go back and ship HTML instead?
So if you are a web developer you get some good advice from this article related to JS not what phone to buy.
I imagine a lot of developers have recent iPhones. They are, depending on benchmark, up to 3x faster than a flagship Android. Which means the top to bottom chasm is much larger than the snippet suggests. Noting it would strengthen their point.
I agree that we the developers should not forget that a lot of people have less powerful hardware.
I sometimes hit thus problem at work, say we offer feature X like uploading an image and you can crop that image and apply a filter, how should I add this feature but not have the code even load in the browser if you don't intend to use, is there a pure JS way to do it? AFAIK thee is no good way to load a script at runtime and get an even when the file is loaded and parsed.
You can do this easily by creating a script element dynamically and then either:
1) Listen for the load event on that element, or
2) Have the dynamic script call a function that is already loaded.
Here is an example of the first technique:
let script = document.createElement( 'script' );
script.addEventListener( 'load', () => {
alert( 'three.js is loaded: ' + THREE );
});
script.src = 'https://ajax.googleapis.com/ajax/libs/threejs/r84/three.min.js';
document.head.appendChild( script );
https://jsfiddle.net/geary/szmc1L0h/9/If my $70 android phone takes forever to execute something, I dont really care if my friend's iphone does it almost instantly.
As a result, they don’t have the tools they use to measure these stats on the iPhone either.