News for hackers. Stuff that matters.
Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @10:06AM (#25187440)
Probably in the store and/or the news feed.

I can’t think of a nice way to say this, but I wonder if this is part of the reason they both perform so poorly once you’ve loaded a lot of data into them. I get so frustrated trying to use the on-console store after only a few pages of scrolling.

Re:The Nintendo Switch uses my open source code by Cthulhu_ on Monday November 23, 2020 @11:07AM (#25188196)
Quite likely; iirc the Playstation's UI (and store) are also made with web technology, and its performance is just so bad.

For a product that is responsible for billions in revenue every year, I would expect them to have some of the best native developers working on it. Instead, they sorta wrangled web technology to sorta work. I don't understand why the performance is so bad on the PS4 of all things, given how it's a pretty decently specced machine.

They, and many other companies, should really look at the iPhone's early success - a BIG factor there was native code, meaning they could run on a single core machine for years while Android was struggling to push device specs up just to get their UI to feel performant.

And Apple's wasn't even optimal; they used objective-c which adds some overhead with every single function call (simplified: 'can I call this method on this object? Yes? Then call the method on the function call'. Only fixed with Whole Module Optimization in Swift iirc).

But it made such a huge advantage in terms of performance and battery life, Apple was easily five years ahead of any competition.

Re:The Nintendo Switch uses my open source code by offtop5 on Monday November 23, 2020 @11:46AM (#25188645)
When minimum viable product becomes the actual product.

To be blunt it's probably more cost-effective for them to hack something like that together, then to take time to actually fix it. If you bought a ps4/5 you're effectively stuck with using that interface. I think they're moving to flutter now, but this is just how big companies work.

Not enough customers are going to not buy a PS4 because the web store is a little clunky.

Re:The Nintendo Switch uses my open source code by da_big_ghey on Monday November 23, 2020 @01:58PM (#25190257)
> moving to flutter

Wow, I'm surprised to see it used in that large of a capacity that soon. I was under the impression that it was still a somewhat-glitchy prototype (especially in any non-mobile uses), but maybe it's time to give it another look. Thanks for mentioning this.

Re:The Nintendo Switch uses my open source code by offtop5 on Monday November 23, 2020 @02:16PM (#25190499)
Using Flutter web right now for a side project.

It's already miles better than React.

Dart itself is absolutely a pleasure to work with. No Babel !

Source for Sony using Flutter

https://devclass.com/2020/10/29/sony-takes-a-flutter-on-embe...

Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @12:17PM (#25189037)
Another justification for purchasing disks, I guess. A much more solid 'ownership' model for games, the loading speed's about the same (since most things are installed to SSD, instead of read from the disk), can purchase second-hand... yup. Disks for me, thanks.
Re:The Nintendo Switch uses my open source code by colejohnson66 on Monday November 23, 2020 @12:28PM (#25189172)
I thought that too with my Switch: use cartridges when I can, but it got frustrating swapping them out when it was docked. So I started doing digital only purchases onto a 256 GB microSD card, and it’s so much better (IMO). I haven’t noticed a difference in load time either.

It doesn’t help that game updates go onto the SD card, not the cartridge. So updates to the whole game basically make your cartridge a DRM dongle.

Re:The Nintendo Switch uses my open source code by Shacklz on Monday November 23, 2020 @11:23AM (#25188379)
Did you ever try to use the playstation platform (network? store? whatever they call it) in the browser?

It's absolutely atrocious; I don't think this has much to do with them using webtechnology, it's just an atrocious heap of spaghetti (and probably, guessing from the weird settings syncing and authentication, an architectural nightmare).

The ball of mud would roll faster if it were written in C++, for sure, but it would still be a ball of mud.

Re:The Nintendo Switch uses my open source code by kuschku on Monday November 23, 2020 @11:13AM (#25188259)
> They, and many other companies, should really look at the iPhone's early success - a BIG factor there was native code,

?????? Honestly I don't understand this argument - the iPhone didn't even support apps at launch, only the 2007 equivalent of today's PWAs, pinned websites.

Re:The Nintendo Switch uses my open source code by projektfu on Monday November 23, 2020 @10:09PM (#25194860)
Right, like is that the reason that Symbian succeeded?
Re:The Nintendo Switch uses my open source code by markjgx on Monday November 23, 2020 @04:05PM (#25191889)
The slowness of the store UIs on consoles is largely attributed to fact they are running their Javascript engines in interpreter mode, for security reasons.
Re:The Nintendo Switch uses my open source code by STRML on Monday November 23, 2020 @10:14AM (#25187555)
Yes, the store is terribly slow. That's almost certainly at the UI layer, which may indeed be something like Electron, which would explain the slowness.

Node.js isn't slow, especially for this use case, but any sort of HTML-based layout definitely is.

Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @10:18AM (#25187588)
Node - V8 - isn't slow when running on a device with a decent processor and fast RAM. The Switch is not such a device.

IME, it's not the presentation, is the loading of assets into memory. Once the assets (like thumbnails, descriptions) are loaded, the display is as fast as always, but you scroll beyond what's cached and it turns back into molasses.

Re:The Nintendo Switch uses my open source code by arghwhat on Monday November 23, 2020 @10:47AM (#25187953)
"XYZ isn't slow if run on a fast enough processor" is an utterly useless statement.

My personal gripe with the eShop is the horrible startup time (compare to the time it takes the settings application to open - part of this can be assigned to it being a web application indeed), lack of partial/incremental presentation, and possibly lack of prefetching. Asset loading causing bad UX is always a frontend problem.

Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @11:11AM (#25188244)
Any interpreted language is going to its performance/memory barriers long before a compiled language as the CPU and memory shrink. It's inevitable; the interpretation is an unavoidable overhead.

Sure, you can write slow code in any language, but the language will limit how fast your code can ever be.

This from a Python fanboi, FWIW. I'd never try and use Python on an embedded device where performance matters, not only for UI responsiveness, but for battery life.

Re:The Nintendo Switch uses my open source code by colejohnson66 on Monday November 23, 2020 @03:02PM (#25191060)
V8 and SpiderMonkey use JIT compilation, not interpretation
Re:The Nintendo Switch uses my open source code by arghwhat on Tuesday November 24, 2020 @02:29AM (#25196162)
V8 and SpiderMonkey extensively interpret, before functions are marked hot and traced, and every time they are deoptimized from failed guards.
Re:The Nintendo Switch uses my open source code by imtringued on Tuesday November 24, 2020 @03:20AM (#25196404)
That only influences start up time.
Re:The Nintendo Switch uses my open source code by arghwhat on Monday November 30, 2020 @05:42AM (#25252468)
No, it affects warm-up, which is not the same. JS is only JIT'ed if the interpreter decides that it has been running code enough for it to make sense, and then not even permanently.

Some things will never JIT. Some things will JIT much later, leading to sudden CPU spikes later. And importantly, code will often deoptimize a few times, meaning that it drops back to interpreted to re-trace even if it had already optimized this code block.

And as most web "applications" are loaded only to be thrown away as you finished reading fixed text, all of those resources were burnt for nothing. This includes an application like the eShop, which has limited need for JS for anything other than lightweight asset handling.

Re:The Nintendo Switch uses my open source code by Closi on Monday November 23, 2020 @10:23AM (#25187645)
It’s amazing to me that the store is as slow as it is too - surely improving this could have a great payback in terms of sales.
Re:The Nintendo Switch uses my open source code by colejohnson66 on Monday November 23, 2020 @03:04PM (#25191088)
It’s extremely frustrating. I like looking at the new releases every few days, but if I wait too many days before checking, I have to go through screen after screen of scrolling and it freezes when it loads the new preview images.
Re:The Nintendo Switch uses my open source code by tokamak-teapot on Monday November 23, 2020 @11:20AM (#25188348)
I noticed this yesterday. I don't know why HTML would be to blame, as I've used web browsers on low power devices before and they can be very snappy.

One thing I noticed was that when attempting to switch between e.g. 'Offers', 'New' and 'Highlighted' or whatever the headings are, there's a large lag / hangup. It certainly doesn't feel like they're working on keeping it fluid and snappy. That might not be a priority, but I'm certainly put off browsing and buying when it's unpleasant to do so.

To be fair, it's worse on other consoles IME, and if I keep my browsing light, stay at the top of lists and don't get too impatient, it's okay.

Re:The Nintendo Switch uses my open source code by imtringued on Tuesday November 24, 2020 @03:19AM (#25196398)
I've never noticed HTML based layouts being slow unless someone explicitly designed a slow UI. The bigger problems are slow startup time and excessive RAM usage. Running multiple browser instances is not sustainable.
Re:The Nintendo Switch uses my open source code by slmjkdbtl on Monday November 23, 2020 @12:14PM (#25188995)
If it's true it's just terrible. The store is not that much of a complext software, yet they still decided to use these bloatware when they can just use their fine GPU and renderer natively.
Re:The Nintendo Switch uses my open source code by therealdrag0 on Monday November 23, 2020 @01:55PM (#25190212)
It’s slowness reminds me of blocking on UI threads.
Re:The Nintendo Switch uses my open source code by chmod775 on Monday November 23, 2020 @10:08AM (#25187465)
You think node.js specifically has anything to do with that being slow?
Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @10:16AM (#25187571)
It's a remarkably low spec device, and anything that's not fairly well optimized is going to behave poorly (games show this constantly). Node.js (V8) was optimized for use on servers and general purpose computers with multiple gigs of RAM and absurd levels of processing power.

So, yes, I think that using Javascript on a low spec device is probably a source of slowness.

Re:The Nintendo Switch uses my open source code by chuckhendo on Monday November 23, 2020 @11:00AM (#25188114)
It likely is being used server side. I seriously doubt Node is being used on device
Re:The Nintendo Switch uses my open source code by falcolas on Monday November 23, 2020 @11:18AM (#25188329)
I hope so as well. Still honked off about the performance of the store though.
Re:The Nintendo Switch uses my open source code by golergka on Monday November 23, 2020 @10:33AM (#25187763)
I'm in love with Node as a developer, but this is definetly not what it was created for.