4 ms·
There is no mention in this article on the effect of modern security measures on desktop app latency. I'm thinking about things like verifying the signatures of
by avidphantasm 3y ago
There is no mention in this article on the effect of modern security measures on desktop app latency. I'm thinking about things like verifying the signatures of binaries before launch (sometimes this requires network roundtrips as on macOS). Also, if there are active security scans running in the background, this will eventually effect latency, even if you have lots of efficiency cores that can do this in the background (at some point there will be IO contention).
Another quibble I have with the article is the statement that the visual effects on macOS were smoothly animated from the start. This is not so. Compositing performance on Mac OS X was pretty lousy at first and only got significantly better when Quartz Extreme was released with 10.2 (Jaguar). Even then, Windows was much more responsive than Mac OS X. You could argue that graphics performance on macOS didn't get really good until the release of Metal.
Nowadays, I agree, Windows performance is not great, and macOS is quite snappy, at least on Apple Silicon. I too hope that these performance improvements aren't lost with new bloat.
- wsinks 3y agoI'm glad you mentioned this in the comments - I was wondering if they were going to touch how applications are sandboxed and everything. I would imagine that is a large part of current 'sluggishness'.
- taeric 3y agoAlmost certainly not? Sandboxing and anything non-visual can happen at a ridiculously fast pace. I'd suspect a lot of this is offloading so much of the graphical setup to not the application. Feels like we effectively turned window management into system calls?
- alpaca128 3y agoIf those mythical safety features actually make an impact then shouldn't they slow down everything, including a hello world program? Yet the performance gap between well-optimized and sluggish software only grows.
- oriolid 3y agoSo, I had to try this. And look what happened on a 2015 Macbook running Monterey (edit: but check the thread below for possible explanation): ojs@MacBook-Pro-4 /tmp % time ./a.out Hello world ./a.out 0.00s user 0.00s system 1% cpu 0.268 total ojs@MacBook-Pro-4 /tmp % time ./a.out Hello world ./a.out 0.00s user 0.00s system 72% cpu 0.004 total It's really that slow on first try. The binary was compiled just before running it, and it's the simplest possible hello world using C++ std::cout, compiled with -O3. C version with puts behaves just the same.
- alpaca128 3y agoIf applications were only slow the first time I wouldn't have any issue with it. But we all know that's not the case. The difference you show depends on the internet connection, on slow wifi I've seen this delay go over 0.7s in the past. But again, just the first time, which is a problem for developers who recompile their code frequently but for the end user experience that's not as relevant.
- oriolid 3y agoDo you know why running the binary is slow for the first time, and that it will be fast forever once it's been run once? I thought it's common knowledge that starting apps for the first time after reboot or after doing something else is slower and usually it's explained by the app being in cache for the next launch. But here the it can't be cache, because reading anything from SSD can't be that slow and it should already be in cache anyway.
- alpaca128 3y agoThe first time you start a program on Mac OS it'll contact an Apple server to see if it's known malware or something like that. So it doesn't happen the first time after boot but the first time you ever run the program after installation or compilation.
- 3y ago
- layer8 3y agoThe comparison between the win32 Notepad and the UWP version is telling, though, on the same hardware, and with the same security constraints. Similar between the old (Window 7) calculator and the newer one.
- torginus 3y agoI don't think all this should be relevant - once it was launched at least one time, the OS should be able to tell that the binary hasn't changed, and thus signature verification is not necessary. The comparison is using OS X 10.6 - I used to daily drive it and it was pretty snappy on my machine - which is corroborated by this guy's Twitter video capture. As for Windows performance - Notepad/File Explorer might be slower than strictly necessary, but one of the advantages of Windows' backwards compatibility, is that I keep using the same stuff - Total Commander and Notepad++, that I used from the dawn of time, and those things haven't gotten slow (or haven't changed lol).
- syntheticnature 3y agoAssuming the binary on the disk hasn't changed opens to time of use type attacks, where an "evil disk" is substituted that changes the binary after the first load. (Or, more likely, some sort of rootkit) Unlikely, yes, but that sort of thing comes up in security reviews.
- qsantos 3y agoCheck it with a cryptographic hash. With I/O bottleneck, and assuming a SSD at 300 MB/s, that should bring the latency to 3 ms, well below human perception. Even the 60 MB/s of slow HDDs should be more than fine. Anyone who has worked on optimizing complex programs knows that you can do a lot with a computer. > 100 ms latency to open Notepad is just ridiculous.
- gizmo 3y agoEven on an M2 Mac Spotlight takes a second or two to appear after you hit the shortcut. Apple notes takes an absurd 8 seconds to start. Apple music and Spotify are also take seconds to start. Skype takes 10 seconds. I'm very happy with my M2 Mac. It's a giant leap forward in performance and battery life. But Electron is a giant leap backward of similar magnitude.
- comechao 3y agoI'm using the Air M2 16GB, switched from Notion to Notes and Reminders, one of the reasons is that these apps are way faster. It also uses under 100MB of ram. Note: The main reason is that Notion is fantastic but too much for me. I'm not that organized...
- occamrazor 3y agoDo you have CPU or memory heavy background tasks? On my M2 spotlight is instant and Notes opens in less than one second.
- LaputanMachine 3y agoTo fix the Spotlight delay, you have to disable Siri in the system settings. If Siri is enabled, the OS waits until you release the space bar to determine if you performed a long or a short press, which causes Spotlight to be delayed.
- njitram 3y agoI just tried all the examples you gave (on my M1 Max) except Skype which I don't have installed here, they all load in 1 second or faster, maybe its something else on your Mac?
- neop1x 3y agoOnce linux is well supported on my M2 Max then I will say bye-bye to MacOS and signature verification.