
Lion Is a Quitter - thisisblurry
http://tidbits.com/e/12398
======
dasil003
I think the author is quick to understate the benefits and overdramatize the
change.

First of all, he dismisses the performance benefits, but frankly why am I even
running the application if it's unused and in swap? Expunging it from memory
with application-level semantics is a potential win because it can
theoretically prevent you from ever hitting swap even after using hundreds of
apps over the course of weeks or months. If you have an app with bad memory
management this could be more than a trivial win.

As to the UX question, Apple is trying to push the envelope and say there is a
better way to interact with a computer. Much like the auto-save stuff, Apple
is re-examining quarter-century-old paradigms that geeks take for granted, but
are perhaps not necessary in today's world of computers that are thousands of
times more powerful. Now it may be that this they are overstepping and this is
creating real usability problems, but it seems more likely to me that a good
portion of computer geeks are simply uncomfortable with any change to
assumptions they've had for the majority of their lifetime in computing.

~~~
lukifer
I agree on a technical level, but the UX change is non-trivial. In fact, it
violates an implicit promise of the UI: the Dock shows you all the
applications you've opened. Maybe techies like us understand that the app was
closed to save resources, and it's a mere annoyance to re-open. But to all the
"moms" out there, it's just broken: they opened it so they can use it, and now
it's not there anymore. This makes the OS feel broken, which makes the
computer feel broken.

There's no reason not to leave an entry in the Dock so as to maintain the
user's expectations, while still recouping background resources as needed.

~~~
YooLi
It's been my experience that all the "moms" aren't the ones opening an
application, closing all the windows, and then sometime later expecting that
application to be there so they can command-tab to it. Instead I see a million
apps left running on the dock because they clicked the red button on the
window when they were done with the app.

~~~
jakewalker
This times 1,000. Mom's don't use alt+tab. The thing people aren't
appreciating is that when you reopen the app (which is available via Mission
Control, via Spotlight, via the Finder or perhaps via the Dock), it restores
to the place it was when it was left (if there were windows open).

~~~
lukifer
I strongly disagree. There are a strong contingent of clueless power users out
there: people who don't know a lot about computers (and don't want to), but
who still use them for many different tasks, every day. And these users do so
by forming familiar habits. And while some of these habits are bound to be
broken by new OS releases, I don't think it should be done lightly. This may
be a small issue, but I still think it was a poor design choice.

~~~
sliverstorm
My aunt is kind of like this. She projects an air of knowing absolutely
nothing about computers and mild distaste for them, and yet she's the most
capable non-techie I know, and has occasionally been known to drop phrases
like "PCI bus" in conversation.

She used to be a typist and a stenographer, so you're probably right about the
forming habits key.

------
losvedir
Ah, so that's what's happening!

Several times now, I've accidentally Cmd+Q'd Chrome because I didn't realize
that TextEdit or Preview was no longer the application in focus.

This happens mostly if I just closed the last of the application windows, and
accidentally expose'd the windows back and forth. If you "Show Desktop" and
then bring the windows back, TextEdit and Preview will now be closed.

I don't think I like it, but it might just be a matter of retraining myself.

~~~
watmough
This just yet another reason that I haven't switched to Lion yet. I don't WANT
to think about this stuff. I want to think about editing some text, then
getting back to XCode.

Don't add some non-deterministic 'feature' that messes up my model of where my
apps are. If you must quit an app to recover resources, do it whilst
pretending that the app is still running, because that's my model.

Perhaps, in regularly cmd-tabbing to running but documentless applications, I
am some kind of uber edge (head) case, but I suspect not.

~~~
baddox
Let me know if this is too pedantic, because I might just not be familiar with
this particular usage, but calling this behavior "non-deterministic" seems
like an abuse of the term.

~~~
ori_b
From what I understand, it can't be predicted by the user -- it depends on
factors such as application's memory image size, system load, idle time, etc.

As a user, I don't know when the app will go away.

~~~
watmough
Yes, the article seemed pretty clear that 1. disappearing an application is at
Lion's discretion, and 2. that the behavior changes over time.

Perhaps if you really think about it, it's deterministic, but it's 'casually
non-deterministic'.

So yes, I'll admit to abusing the term in its pure sense.

------
tghw
I've never understood the "no open windows but still running" model of OS X.
In some ways, this makes more sense, but it also makes it more confusing,
since you don't know what state the application will be in when you try to get
back to it.

What I really wonder, though, is why leave it running at all if you're just
going to kill it later? Seems to me they should have just changed the model to
quit the application when the last window is closed, unless the application
tells the OS not to.

~~~
Someone
Time travel back to 1984. If you quit MacWrite, it takes ten seconds or more
before the Finder appears (the Finder, of course, wasn't running; there simply
wasn't enough RAM to do that) If you now double-click a document, it takes ten
seconds or more before MacWrite has started and opened your document.

MacWrite, being a marvel of tight engineering, manages to handle documents of
a whopping two to three pages in the 40 kB or so of RAM available to it. So,
if you want to write a huge document of say four pages, you have to split it
into smaller parts.

If MacWrite quit when you closed its only window, moving from part 1 to part 2
of your document would take over a minute. That is why document-based Mac
applications do not quit when you close the last document.

Back in 2011, many people will expect that command-W, command-N will close the
current document, then create a blank new one. If Mac OS X Lion quit
applications as soon as the user closed the last window, that would no longer
work. That, I guess, is the reason that the OS waits for a while before doing
that.

Is that a good idea? I think quitting apps is a good idea, as long as the OS
manages to completely hide it from the user. Apparently, the current behavior
isn't good enough, as it annoys some people a lot. On the other hand, it may
just be a matter of getting used to the change.

~~~
tghw
That's why I specifically called out OS X. In 1984, that model made a lot of
sense. But sometime during the next 17 years, computers got powerful enough
that the reason doesn't really make sense anymore, and we fall back to
"because people are used to it".

But it's clear from Lion that Apple doesn't really care what you're used to.
We've had scrolling mice for about as long as we've had OS X, yet they chose
to reverse it's function in Lion because, after entering the age of touch-
screen devices, they realized the old model was wrong.

I just think it's a little odd for them to implement a half-way solution like
this.

~~~
Someone
I wasn't aware you knew the history. I find it odd, too, but i can think of à
reasonable reason for doing this. Good apps without anything to do will not
use CPU time, so the only concern is swap space. That, I think, must be the
reason for implementing this: on SSD systems, swap space can be scarce (hm,
there may even be hardware in the pipeline where it is even scarcer)

I do look forward to a better solution, though. The days of the "Quit" menu
item are numbered. Longer term, I think we should get rid of File-Open, too,
bring back Lisa-like Stationary documents, and remove File-New.

------
cynicalkane
Computer resources are so cheap that the idea that, for most user
applications, the openness of an application is a "state" should be obsolete.
For apps that start up quickly and auto-save, why should the user care if
they're open or not? The desktop is just playing catchup.

The only loss is that you can't tab between applications without paying
attention, but I suspect that many users don't do this anyway.

~~~
ori_b
If they're going this route, then the user shouldn't be able to tell that an
application has been closed behind their back. The application should just be
restored when they try to switch back to it.

If the openness of an application should be obsolete, then the user shouldn't
be able to tell without explicitly poking through 'ps'

~~~
dasil003
They actually did this, with hiding indicators on the dock by default, but
then reverted it in the final GMs. It's definitely the direction they are
going in, but it was probably deemed too radical a change for this release.
Maybe in 10.8

------
program
It's called auto-termination:

[http://developer.apple.com/library/mac/#documentation/Genera...](http://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign/CoreAppDesign.html#//apple_ref/doc/uid/TP40010543-CH3-SW27)

Only applications that support auto-save AND set
NSSupportsAutomaticTermination to YES do quit when there are no open windows.

~~~
maqr
So it should be a pretty easy hack to disable NSSupportsAutomaticTermination
across all apps, if somebody felt so inclined.

------
mjijackson
So glad that Apple is finally at least trying to make some smart decisions
around this. I can't tell you how many times I've gone to troubleshoot
something on a friend's computer and they have about 20 apps "open" and no
windows. Of course, when I ask why they have so many apps open, they have no
idea what I'm talking about.

Since most apps don't implement "close when the last window closes" Apple is
simply trying to do some smart checking for the sake of these users.

~~~
Tichy
Except that this problem only existed on OS X to begin with - Linux and
Windows never seemed to have it. Seems they manage to ensure that closing the
last Window closes an app. The Lion way seems worse than the non-Apple way to
me.

If the argument is really "today's computers have enough resources", then apps
should maybe never close, not do a Heisenclose in the background.

------
thought_alarm
There are two seemingly opposite behaviors in Lion:

1\. _Application without a process_ : if an application has one or more open
documents but no documents visible on screen, the app may terminate itself
when resources are low. The applications still appears to be alive in the dock
and command+tab menu, but its process has been terminated and is no longer
consuming resources. When you command+tab back to the application it restarts
itself and restores its previous state.

2\. _Process without an application_ : if an application has no open documents
it will appear to quit automatically and is removed from the Dock and
command+tab menu. In actuality, it remains running in the background ready to
spring into action again.

The question is, why support behavior #2 at all?

Behavior #1 covers the automatic resource management and I think it works well
(and unlike iOS, Mac applications can opt-out of this behavior). Behavior #2
seems to be aimed at Windows users who have no concept of "Quit", but it only
aggravates long-time Mac users with zero actual benefit with respect to
resource management. It has nothing to do with iOS and everything to do with
grandma Windows users who just bought their first MacBook.

~~~
sudont
#2: Any headless process that's scanning, or performing a behind-the-scenes
operation. And note, it's _window_ not _application._ Because an application
could reliably stay open without a window… until now.

Mail. File Transfers. Staying available for chat. Rendering process that can
run headless. (Handbrake, I think, plus others.)

~~~
thought_alarm
Applications that appear to quit are essentially suspended; they consume RAM
but not CPU and cannot do work in the background.

If an application needs to do work in the background then it is not subject to
automatic termination by either behavior #1 or behavior #2 and simply remains
running.

~~~
sudont
You’re very correct on everything. However, what about anything that is
largely async? Background daemons?

------
amichail
Applications that are terminated shouldn't disappear from mission control or
any other aspect of the GUI.

However, the user should have some control over what to show in mission
control and elsewhere -- namely the k most recently accessed applications
(whether or not they are running).

------
mahrain
This will be wonderful for new Mac users, Windows-to-Mac switchers and other
non-technical people on a Mac. Countless times I have been asked to fix
customers' aging systems only to find that nearly all applications in the
Adobe Creative Suite were running simultaneously with 1GB of RAM, that kind of
thing. And plenty of other apps on the side. This step might be very helpful
to these users who don't actively manage resources or expect an app to quit
when they close the last window (as is customary in Windows operating
systems).

------
mark_l_watson
I mostly use my MBP for Java, Lisp, and Ruby development and I like Lion,
after about 10 days with it. Reopening applications where they were before
seemed lame at first, now I like it. Same for showing the last bit of text in
Terminal windows.

One thing that I really like is FileVault 2. I have a lot of sensitive data
for several clients on my laptop (SSH keys set up for their servers, AWS
credentials, proprietary materials, etc.) and I used to go through a tortuous
process of having encrypted file volumes that I had symbolic links to files on
the volumes. I wasted a good 3 or 4 minutes a day with this. I set up
FileVault 2 and encrypted all of the external disks that I rotate for
TimeMachine backups (I tend to use one for a few days, switch to another, keep
rotating), and now I just keep everything on my permanent disk partition. One
hassle: I lost my time Machine "history" because the conversion process to
encrypted external disks requires a reformat; I thought that it was worth it.

------
jsz0
I've been using Lion since the early DP releases and I've never had auto-
termination kick in. I tend to leave apps open for very long periods of time.
GarageBand has been running for at least 2 weeks and it's still running. I
know it's been at least a week since I used it last. This machine has a lot of
RAM so possibly it's working off the amount of free memory available? If so
that seems like a smart feature to me. If you have 8-12GB of RAM you'll
probably never see auto-termination in action. If you have 4GB you'll see it
now and again. If you have 2GB you'll see it a lot but your machine will
likely be running much better. On my old MacBook Air with 2GB the first thing
I did when it got bogged down was to quit unused applications so...

------
warmfuzzykitten
The obvious fix for auto-close is to make applications close immediately when,
and only when, the last window is closed. Then the user can associate it with
an action they took. But the business of closing apps because windows are
minimized is just creepy.

As to auto-save, get over it. I never want to lose another hour of work
because I haven't saved and a damn app crashes or hangs. The model that Google
Docs uses works for me. It auto-saves periodically (the saved state is visible
at all times) and the user can save more often if desired. But it would be
fine with me if Lion somehow managed to save continuously (and performantly)
and take Save out of my vocabulary.

------
barrkel
This has pretty much always been the Apple philosophy. I find it quite
perplexing that he thinks this style of treating the user is reminiscent of
Microsoft; on the contrary, Apple thinks Microsoft gives the user hassle by
leaving them with too many pointless choices to make.

I don't find Apple's perspective objectionable in principle, though I do
prefer Microsoft's approach. Most novice users will generally prefer Apple's;
whether that's the case in this specific instance is an open question,
however. I'll bet most users don't even have a clear mental model of a
document editing application distinct from the documents it's editing.

------
dmazin
I know the dock was supposed to do away with indicator lights right up until
the retail release itself. The message is clear: don't worry about what's
running or not. Apple went back on it at the last minute, apparently.

Before upgrading to Lion I kept everything closed but my active windows. But I
decided to turn off the dock indicators as an experiment and I have to say, my
experience has improved drastically. I don't close things anymore, and I don't
worry anymore. For example, opening iTunes, which I do about daily, is no
longer a ten-second wait, which is actually kind of soothing.

------
AndrewWarner
I love my Mac, but I never understood why closing the last open window of a
program like Pages doesn't just shut down the program.

Most people assume it does that any way.

This is something that I think MS does more intuitively than Apple.

------
teodortrygg
Personally I think that the changes in the new OS is made mostly for the
general user, but this has lead to a really weird RAM distribution. The load-
times has doubled and it's not as quick on the regular tasks either.

Spaces: Gone If you have a lot of different windows up at the same time, its
impossible to use. Its impossible to scatter the windows and find the window
you're actually looking for.

Other than these small shifts: I'm all good with the new OS. As I'm not a
power-user I can't see any fault in a 3sec load time instead of 1-2sec.

------
trotsky
Heavy use of virtual memory and swap doesn't make sense when your only storage
device is NAND flash. Killing and restarting unused processes makes sense when
you are shipping devices with low amounts of SDRAM but fast disks and
processors. So these features aren't built for your macbook pro with 8gb and
magnetic disk, they're built for your macbook air with 2gb and SSD.

------
rjd
I'm 90% sure I read this is an new API feature of Lion. I'm sure I read this
when looking into how the sandboxing was designed to work.

If I remembering correctly you can choose to make available an autokill flag
for the system. From (my) memory you can control it programmatically... so if
you say "no windows open and been alive for 10 minutes with no state change"
then kill me.

------
topbanana
One other annoying quirk of automatic termination is when you need to install
software that requires other applications to be closed first. I needed to
install Office yesterday, and it asked me to close Chrome first. The
installler wouldn't actually close until I force closed Chrome from Activity
Monitor. OK for me as a dev, but fails the grandma test

------
jeromeparadis
Surely there should be a preference to disable this behavior. I suppose
there's not. There's a use case here were things are better left to the user.
I hate it when software thinks it knows more than I do and thinks it's
brighter than I am. I haven't switched to Lion yet and frankly, I'm don't
think I'll do soon.

------
megablast
To me, this is no where as big an issue as not being able to copy files and
skip the ones already present, which I was able to do in Leopard and Snow
Leopard, but apparently I no longer should ever need to do in Lion. Thanks
Apple.

------
MrJagil
In a decade we won't ever have to open and close applications. We'll have
enough resources to have everything open, always.

No opening, no saving, no closing. Just instant switching.

------
darklajid
Only partly serious:

So Apple supports now onSaveInstanceState() / onRestoreInstance() for
desktops?

------
ldar15
Dear Apple: please make "dead" apps continue to show up in the application
switcher. If I kill it, fine, remove it from the switcher, but if I dont kill
it, then it should still appear to be alive, even if its process has been
killed.

------
drivebyacct2
Using TextEditor on Lion is a frustration and exercise in patience. Every time
I want to start it and just type a quick note... I have to wait as it's
disappeared or it's restoring previous windows. Sometimes it even gets in a
weird state where it thinks a document is open, but it's not, so attempting to
open it results in TextEdit being given focus, but not opening the document in
question.

~~~
w01fe
Lion's TextEdit also takes > 10 seconds to pop up on my brand new mac with an
SSD. Fortunately, Snow Leopard's TextEdit.app still works, and is just as
snappy as ever, if you still have a copy. Hopefully they'll fix this in the .1
update...

~~~
Flow
Weird, takes sub-second first time here on my iMac with no SSD.

