13 ms·
The Finder’s GUI tax can be very expensive
- advisedwang 10y agoHow did they not title this "Finders Fee"
- hughw 10y ago"Finder (nee Archive Utility) should just execute the task without any visual feedback" -- no.
- hyperpape 10y agoI also thought that was wrong. One idea is a progress window if the task takes more than a few seconds, plus some visual indicator for success.
- blt 10y agoThis isn't a dichotomy. It's possible to make a fast-performing GUI for this task. The GUI is slow due to poor engineering.
- hyperpape 10y agoThat's true, but I'd argue that a window that appears and disappears within substantially less than one second is often a bad idea anyway. Progress indicators are for things you wait on.
- hbosch 10y agoI agree there should be visual feedback, but maybe more of a compromise. E.g. bundle all unzip tasks into 1 single progress bar and rotate text strings for informing which task is underway. The "dancing" modal is quite ridiculous.
- nayuki 10y agoThis is basically what happens in third-party tools. For example if you use 7-Zip on Windows to unzip multiple archives, there is only one progress window and progress bar, and it will display the names of each archive being extracted one after another.
- wruza 10y agoIf operation takes more than human's average reaction time, progress should be shown. Usually 250ms. Jef Raskin and others wrote a bookshelf about that a decade ago, but I still see strange solutions everywhere.
- aidenn0 10y agoIn this case it's showing a 24 progress bars each for an item that takes less than 1ms.
- pvdebbe 10y agoJ Nielsen would disagree with you. A subsecond operation could very well operate without visual feedback and only after that start showing the progress. Does finder have a way to show messages in status bar or some such? For quick ops it would be ideal to say, "operation completed".
- kalleboo 10y agoApple disagrees - the Finder already handles this without any visual feedback for file copy operations - you don't get a file copy progress dialog if it takes less time than you need to react (just an audio confirmation).
- TheAceOfHearts 10y agoIf someone is looking for an alternative with a GUI, I use The Unarchiver [0] and I'm generally happy with it. I don't usually have to expand lots of small files like the OP, so I don't know how it compares with that task. [0] http://unarchiver.c3.cx/unarchiver http://unarchiver.c3.cx/unarchiver
- curun1r 10y agoSeconded. The Unarchiver is always one of the first things I install on a new Mac. The same author is also responsible for another program, Xee, which is a great, no nonsense image viewer. The 3.x version costs a few bucks, but the last 2.x version can still be downloaded for free.
- syrrim 10y agoThe unarhiver also handles .rar files, whih archive utility can't do.
- Normal_gaussian 10y agoIf we are assuming the underlying expansion is as efficient then the cost comes either in the boilerplate or mistakes made when parallelising. In the case of the boilerplate the solution would be embedding some more of the linked code and reducing IPC/other unnecessary bottlenecks. However I suspect the error is in the parallelisation, which is not surprising, especially as the authors likely optimised and tested for large, not small, files. As it is, removing the GUI is perhaps the worst thing you could do to the user. Closely followed by inducing epilepsy with that ridiculous expanding dialog.
- cesarb 10y ago> a window with a single progress bar for the entire task would be OK, but would still slow operations down. There's a simple way to do a visual progress bar with almost zero slowdown: run the task in a separate thread from the progress bar, and update the progress through lock-free shared variables. Make the progress bar read the shared variables only a couple of times per second, sleeping between its updates.
- fredsir 10y agoIt's not only the communication between the task and the GUI that is slowing things down (if it is at all, which I doubt). Even more, I think, it's the fact that macOS, the OS in question, has some conventions for windows, controls and so forth, one being that it takes X seconds for the window to appear and X seconds for it to disappear. If it was being shown and hidden again as fast as the task starts and finishes, it would be just be a flicker on the screen, which would confuse the user. It also doesn't make sense to spend a second to show a window, if the progress bar it embeds has completed before the second has elapsed, so there has to be a delay there, and so forth. The task is so quick it can really not be presented to the user without the presentation being slower than the actual task. I think it comes down to good UI+UX, which in this particular case becomes bad UI+UX.
- oneeyedpigeon 10y agoI think an 'in-line' style of alert can work well in this situation, like a status bar but closeable. It can be dealt with at a time most convenient to the use, still provides feedback. It could even just display the output of a CLI command with a given flag, even for a small subset of 'blessed' commands if necessary.
- userbinator 10y agoIf it was being shown and hidden again as fast as the task starts and finishes, it would be just be a flicker on the screen, which would confuse the user. Maybe the really inexperienced users, but it makes sense that something which happens quickly, will mean a window that also appears and disappears quickly. This is why Windows has options to disable animations and other effects, and everything does feel noticeably more responsive when they are disabled --- windows and menus appear and disappear instantly.
- __jal 10y agoThey should make the UI idiom feeding your file a mushroom and then double the icon size on completion.
- DominoTree 10y agoThe window animations in Mac OS itself can make things feel very sluggish as well, although the velocity-based ones seem better with Sierra.
- module0000 10y agoJust want to add, `unzip` from your terminal window can be used as well. If opening those gz's every month is a pain, you could handle it with something like: `unzip -r my_stuff_{1..99}.zip`
- proaralyst 10y agoThe files in the article aren't zips, they're individually compressed files. Thus, unzip won't work.
- jcoffland 10y agoWindows explorer unzip is even worse. Recently in a VM I tried unzipping boost 1.62.0 using explorer in Windows 10. It said it would take over 3 hours. The same file was decompressed on the command line in about a minute using 7zip on the same VM.
- Piskvorrr 10y agoFor a tool that's supposed to be on most desktops by default, Explorer has some strange inefficiencies, such as the estimation and the loooong "preparing to copy" phase. Perhaps they are carried over from the old Windows NT codebase?
- Someone 10y agoWindows also always unzips to a fixed scratch directory before creating the real files. That scratch directory is %TMP% or %TEMP%, I think, but it definitely always is on the same disk, typically C: If you unzip files to another disk than where that directory lives, it unzips to its scratch directory, then _copies_ the extracted files to their destination, and finally deletes the scratch files. That's bad in itself, but doubly so if the disk where it unpacks doesn't have room for the unzipped files. Mac OS had a system call "Give me the temp directory on this disk" (FindFolder) that made it possible to extract to a temp directory and then move the result to the destination. That call made it into Carbon. I don't think macOS still has it, but it seems UnArchiver does the right thing, anyways.
- aidenn0 10y agoInternet explorer did the same thing with downloads; I discovered this when I had a 1GB C: drive and a 6GB D: drive and tried to download something that was too large to fit on the C: drive.
- patio11 10y agoI wonder whether this is not an example of a UI interaction which is slow on purpose, to emphasize how much work the OS is doing for you. TaxAct and TurboTax, for example, both operate on (in the typical case) kilobyte scale data requiring trivial math. They also make both saving the data and calculating taxes take 5+ wall-clock seconds when they actually require milliseconds and nanoseconds respectively. This is largely because (non-technical) users don't trust your computer did the math right if the answer comes back instantly. (I also suspect there is an element of "Wait if it is so easy to calculate my taxes why am I paying you to do that.")
- TazeTSchnitzel 10y agoThis reminds me of how some PlayStation game's developers complained that they were required by Sony to add a false multi-second delay to their game's save routine, so the user would have enough time to read the mandatory warning not to turn off the console. Their game in fact saved so quickly there needn't be a warning at all.
- matheusmoreira 10y agoThis is really interesting. I read that warning every time I save and I never noticed the delay. For some reason, it doesn't bother me like the archive utility animations. I guess it's because saving the game is a such ritualized action. I wonder what other requirements Sony imposed on developers. Maybe they have their own video game-oriented human interface guidelines. Do you have a source for this information? I found plenty of technical documents and SDKs but nothing about interfaces.
- chipperyman573 10y agoKind of related, the reason there's a "Press A to play game" on xbox (and a lot of PC ports) is because Microsoft requires a button press every x seconds, and if the game takes too long to load before the menu appears, pressing A will circumvent that requirement.
- headcanon 10y agoI've encountered this in command-line programs as well. Print statements take a non-zero amount of time and depending on the language, can be quite slow, so for an otherwise-fast operation in a loop, if it prints a line every time then it can contribute significantly to the overall speed of the program. Removing the print statements in some cases can speed up the code by an order of magnitude.
- dijit 10y agoquiet reminder that writing to file descriptors is blocking. STDERR and STDOUT are file descriptors.
- orf 10y agoYep, and this is very noticeable if your using windows and select any portion of the terminal. All stdout/stderr is blocked. I had a call when one of our services stopped responding. Took a while to figure out there was a tiny one-character selection in the power shell.
- deleted 10y ago[deleted]
- colemickens 10y agoI often wonder if its why it took them over a decade (two decades?) to enable QuickEdit mode by default. Sometimes I'll wonder why something is taking so long and realize that my palm accidentally caused a quickedit selection in cmd.exe.
- thaumasiotes 10y agoMaybe so, but, as pointed out elsewhere in the thread, printing to stdout is much, much, much, much slower than printing to a file. The fact that stdout is a file descriptor can only explain a vanishingly small quantity of the time cost of using it.
- 10y ago
- vortico 10y agoThis will be sort of bluntly stated, but I challenge anyone to show me an example of where animation is a usability improvement over no animation at all. I understand how it may be visually pleasing, but I work on computers, not enjoy it as an art form. I do some UI design too and don't remember the last time I added animation. Can anyone find an exception?
- pvg 10y agoMost transition effects where things are added or removed from a group of objects - without the visual cue, this can happen so quickly it's hard to see where the removal or addition happened. The tab bar in your browser is a good example.
- xsmasher 10y agoMany animations are simply stylistic, but others convey information. Any animation that gives you "almost there" information about a gesture; fro example, holding your finger on the screen in Minecraft PE starts an animated circle. When the circle completes, the action is complete. It provides extra information. Ditto for the "swipe right to delete" animations in iOS mail; the animation lets you know which side of the "show options vs delete" wall you're on, and how close to the edge.
- appleflaxen 10y agothe rotation animation when turning your phone to landscape mode.
- ythn 10y agoThere's a point where printing progress is actually a huge bottleneck to performance. Try it out in python. Make a for loop that loops a million times and prints "Hello". Run the program once normally, and a second time piping the output to a file. You'll find the first one takes 15 seconds, while the second one is near instantaneous.
- goldenkek 10y agoThis is a false equivalence. As long as the progress is set correctly via messaging (queue) to an alternate UI thread, the time lost will be under a millsecond. The naive print loop you provide is obviously IO bound and print is a blocking IO call. Use an async print IO and youll have much better performance. Narf!!
- castratikron 10y agoIsn't there some disk caching going on here? Surely the OS is not writing directly to disk immediately after gunzipping. I don't think that's enough to explain the large difference, though.
- bluedino 10y agoReminds of of this Raymond Chen post: https://blogs.msdn.microsoft.com/oldnewthing/20060220-00/?p=32233 https://blogs.msdn.microsoft.com/oldnewthing/20060220-00/?p=... A Windows program ran faster if you clicked and held the mouse button on the title bar (as if you were going to move the window) because it would stop the window from re-drawing itself, making whatever loop it was running (and constantly updating the GUI) go faster.
- michaelbuckbee 10y agoIt's fixed now, but for a while it was significantly (20 to 40%) faster to install npm without the progress bar. https://github.com/npm/npm/issues/11283 https://github.com/npm/npm/issues/11283
- couchand 10y agoJust to clarify, that's 'npm install' not 'install npm'.
- somanychoices 10y agoThe rationalizations are kind of silly... oh no, the uninformed users might otherwise do or think this or that; actually, this is shit workmanship, that is all it is, and it's up to the people who have the faintest clue to point at it an laugh until it becomes better workmanship. If you use energy you should use attacking it on defending it, you're now part of it.
- rebuilder 10y agoEven worse, IMO, is that the default behaviour for Archive Utility is to just unpack the contents of a zip file in a directory under which it's found. Sometimes I just want one file out of a huge zip... Actually, quite often I want to see what's in a zip before uncompressing.
- whywhywhywhy 10y agoGreat example of someone justifying engineer driven design over user driven design. Not understanding at all why it was made that way in the first place.
- stefs 10y ago"... slow, it’s the GUI interface to the computer ..." he ... he wrote GUI interface. heh.