News for hackers. Stuff that matters.
Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @06:35AM (#22717825)
Even though the average Android phone doesn’t compare performance wise to an iOS device and really sucks when it comes to running complicated web apps, it’s mostly Android users here who claim that progressive web apps are the future and that Apple is holding them back.
Re:Mobile CPUs and the Performance Inequality Gap by nicoburns on Sunday March 29, 2020 @07:14AM (#22718036)
That's because it's not performance that's holding back PWAs. With a bit of work, perf was good enough for web apps on an iPhone 4S or earlier. iPhone 4s was released in 2011, so if low-end android devices are not hitting 2012/2013 iPhone performance levels, then they're also good enough for PWAs.

It's the lack of platform APIs for things like offline storage and push notifications that are holding back web apps, not performance.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @07:33AM (#22718140)
I bought my son a MotoG back in 2017. Because I kept reading that it was a good midrange Android phone. It was slow running “native” apps, web performance was even worse.

He was more than happy to “upgrade” to my iPhone 6s (2015) in 2018. Performance was noticeable better. Also, it is still supported by the latest version of iOS.

Of course by then the phone was three years old so I replaced the battery.

Re:Mobile CPUs and the Performance Inequality Gap by Justice4Yall on Sunday March 29, 2020 @08:17AM (#22718345)
ios 14 won't support 6s most probably and soon your iphone 6s will go to trash.

So your comment is lucky to have some truth for a couple of months while I look at my trashed iphone5 and iphone 6.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @08:30AM (#22718441)
The iPhone 6s would have gotten 5 years of os upgrades. But, just because Apple won’t support a device with latest version of iOS, doesn’t mean that it won’t provide security patches and bug fixes. For instance, Apple released bug fix patches for iOS 9 and iOS 10 supporting phones back to 2011 last year.

https://appleinsider.com/articles/19/07/22/apple-issues-ios-...

As far as going into the trash. I had an old iPad 1st generation (2010) that last saw an OS upgrade in 2011. I could still download the “last compatible version” of apps like Netflix, Hulu, Plex and Crackle and they still work. iCloud syncing also works with Apple’s iWork apps and the built in apps (except for Notes).

Re:Mobile CPUs and the Performance Inequality Gap by Justice4Yall on Sunday March 29, 2020 @08:36AM (#22718474)
basic html support doesn't work on earlier versions of ios safari due to the wrong decision that safari is bundled to ios.

you heard safari is the new internet explorer? that's why it's impractical and unsafe to use earlier versions of ios.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @08:41AM (#22718506)
I’ve “heard” a lot of things. But, my first generation iPad from 2010 could render any page that I went to. Of course it crashed all of the time because that iPad only had 256Mb of RAM.

As far as being “unsafe”, Apple was publishing patches for iOS 9 and 10 as late as the middle of last year.

But do you really want to compare Apple supporting older hardware to Android?

Re:Mobile CPUs and the Performance Inequality Gap by ge96 on Sunday March 29, 2020 @07:26AM (#22718104)
Yeah regarding no filesystem, not sure if it is dumb but I was using Dexie(IndexedDB wrapper,) to store images as base64 strings. It works but what can suck is the time to turn it back to an image to be displayed. Which using small thumbnails it's not bad but without pagination(seems obvious you should) but it's so much data it throws a chromium-level error so idk ... But was faster to reach MVP than RN for me with my skills. There was an offline-first requirement so that's why the images are stored that way but it has a remote REST API for sync and S3 for storing the large images.
Re:Mobile CPUs and the Performance Inequality Gap by voodootrucker on Sunday March 29, 2020 @08:03AM (#22718281)
I'd be curious about the performance difference storing them as blobs https://hacks.mozilla.org/2012/02/storing-images-and-files-i...
Re:Mobile CPUs and the Performance Inequality Gap by ge96 on Tuesday March 31, 2020 @11:15PM (#22745270)
thanks for the idea, I will try it because it looks like BLOB is smaller than base64 and looks like maybe faster to render too due to not having to decode/encode. It is unfortunate I was not aware of this sooner with regard to the "data format juggling" but still...

I'm having an issue where there's too much data being loaded/pulled from Indexed DB so I have to do stuff like pagination, but this will help no doubt.

Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @06:45AM (#22717876)
Because Angular, React, Vue aren't needed for like 90% of those applications, server side rendering is more than enough.

Specially when tons of "native" applications are actually Cordova and Ionic garbage that take longer to start than a HTTP server reply to the native browser.

Native applications are great, when we are talking about stuff that actually makes use of the GPGPU or hardware sensors.

Outside games, office and drawing applications, I don't have any applications installed that couldn't easily be done as mobile Web sites.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @06:50AM (#22717907)
How are you going to have a PWA that works offline with server side rendering? The latest “Apple wants to force everyone to develop apps instead of using the web so they can get their 30% cut of mostly free apps” controversy was about offline storage expiring after 7 days.

Not to mention that the same people who are buying cheap Android phones probably have limited data plans and/or low bandwidth.

Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @08:19AM (#22718358)
By having a server worker that caches the whole site, done.

Apple's decision doesn't apply to PWAs as clarified on a later update.

Plus updating the browser cache every couple of days isn't a big deal, native apps get store updates almost every day.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @08:42AM (#22718514)
So, no dynamic changes of the UI? We are talking about “web apps”.
Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @09:24AM (#22718792)
Many "web apps" are plain CRUD entry forms with fancy CSS animations.
Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @10:32AM (#22719278)
I’ve done CRUD apps on mobile mostly for field services (technicians, deliveries, etc.) where it had to work offline. Even then you needed to navigate between screens, menus, navigate to different screens based on options chosen, client side validation, manage state on the client, etc.

You still needed UI changes.

Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @11:04AM (#22719559)
Still possible with service workers without having the poor browser chew a SPA framework.
Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @11:23AM (#22719713)
How do service workers help if you can’t depend on having a network connection?

Are you really saying that it would he more performant that you have to make a round trip just to perform validation? How slow would the hardware have to be for a network round trip to be faster?

Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @12:33PM (#22720284)
By reading from the cache the necessary static HTML and CSS.

Validations always need to be done on both sides, unless one does not value security.

All of this is possible with vanilaJS, using builtin browser features, no need to kill the poor CPU with an additional bloated framework.

I used to be big in native apps, until having seen too many examples of what used to be done in VB/Acess back in the day.

So unless it is a game using OpenGL ES 3.0, Vulkan, Metal, something that requires AR/VR, real time audio, GPGPU for machine learning, or direct access to hardware sensors, it might be quite doable as PWA.

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @01:32PM (#22720801)
Validation does need to be done on both sides. But validations on the client side means no round trips and you can do validations even when you’re not online. Also even if the content is “static”, if you don’t have access to the network, how do you do simple things like display totals from service charges, a receipt of all the items delivered - propane as deliveries and tank repairs, alarm installation or at home nurse care where they had a checklist?

Even with CRUD apps you need to display dynamic content based on user interaction.

I used to be big in native apps, until having seen too many examples of what used to be done in VB/Acess back in the day.

So you haven’t seen the poor performance of ASP.Net Web Forms with the huge hidden field to maintain state and redrawing the screen for every interaction and a network round trip?

Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Sunday March 29, 2020 @02:14PM (#22721214)
Not to the point that it actually matters, in a world were plenty of people are deploying node, django and rails applications.
Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @02:28PM (#22721312)
if you haven’t noticed, the world is moving away from server side rendering - even Microsoft is pushing toward client side rendering.
Re:Mobile CPUs and the Performance Inequality Gap by pjmlp on Monday March 30, 2020 @02:25AM (#22725707)
I notice what our customers pay for and write on their RFPs, everything else are just caravans passing by our shovel store.
Re:Mobile CPUs and the Performance Inequality Gap by arendtio on Sunday March 29, 2020 @07:38AM (#22718162)
I run my own PWA on a 2012 Samsung Galaxy S3 and the only performance problems I have, are due to bad decisions as a developer (e.g. loading all elements of a list isn't such a great idea when the list grows over time and you use the app for 3 years (so far)).

So if you are serious about building PWAs you shouldn't have performance issues. Yes, they are a bit slower than native apps, but with today's devices that shouldn't matter.

The issue with Apple is, however, that they don't support all the APIs you need to create an awesome PWA (and decided recently to throw away the localStorage every 7 days unless the user wants to clutter his desktop with every PWA that needs to store data on the device for longer periods).

Re:Mobile CPUs and the Performance Inequality Gap by scarface74 on Sunday March 29, 2020 @07:56AM (#22718252)
That’s actually a good thing. If every website could store data indefinitely, it would be abused. By only allowing long term storage for websites that the user “installed” on their phone by adding it to the home screen expresses intentionality.