[comp.sys.mac] Why does it take forever to launch an app some times???

stevens@boulder.Colorado.EDU (Curt Stevens) (05/10/89)

I am wondering why sometimes applications launch quite quickly and other
times it takes quite a while. I know the desktop is a sequential file,
but if I launch an app and it starts slow, then I quit and launch again,
the app starts much faster. What gives?

===============================================================================
|Curt Stevens        (303)492-1218 |   /   |arpa: stevens@boulder.colorado.edu|
|University of Colorado at Boulder |  o o  |uucp:{ncar|nbires}!boulder!stevens|
|Computer Science Department       |   |   |----------------------------------|
|Campus Box 430                    |  \_/  |Its a dog eat dog world & Im wear-|
|Boulder, Colorado 80309           |       |ing milkbone underwear.Norm@Cheers|
===============================================================================

========
| Curt |
========

cruff@ncar.ucar.edu (Craig Ruff) (05/10/89)

In article <8705@boulder.Colorado.EDU> stevens@boulder.Colorado.EDU (Curt Stevens) writes:
>I am wondering why sometimes applications launch quite quickly and other
>times it takes quite a while. I know the desktop is a sequential file,
>but if I launch an app and it starts slow, then I quit and launch again,
>the app starts much faster. What gives?

I just saw this very same thing happen yesterday.  I had just mounted a couple
of NFS file systems via a GatorBox.  Then I started a small application.
It took a minute easily before the name appeared on the menu bar.  During
that time, the little AppleShare arrows were visible.  I don't know what
was going on.
-- 
Craig Ruff      NCAR                         INTERNET: cruff@ncar.UCAR.EDU
(303) 497-1211  P.O. Box 3000                   CSNET: cruff@ncar.CSNET
		Boulder, CO  80307               UUCP: cruff@ncar.UUCP

newman@ut-emx.UUCP (Dave Newman) (05/11/89)

The second time you launch an application, it uses the cache
(assuming the cache is turned on and the stuff in the cache
has not been flushed).  Thus, the second time you launch an
application, it will be faster since the machine does not 
have to access the disk.

>>Dave

P.S. To check this, look in the control panel at the General CDEV.
There is an item there to control the status of the cache (size
and whether it is on or off).

lsr@Apple.COM (Larry Rosenstein) (05/11/89)

In article <3207@ncar.ucar.edu> cruff@ncar.ucar.edu (Craig Ruff) writes:
> of NFS file systems via a GatorBox.  Then I started a small application.
> It took a minute easily before the name appeared on the menu bar.  During
> that time, the little AppleShare arrows were visible.  I don't know what

The Finder was probably updating the desktop information on the server 
volume(s).  Any delay between the time you launch the application and its 
name appearing in the menu bar is the Finder updating the desktop file.  
This would happen if you opened folders, moved icons around, etc.  The 
Finder also empties the trash at this time.

One funny story related to this.  In the early days before MultiFinder, 
certain applications
(which shall remain nameless) would call InitWindows when they exited.  
Besides initializing the Window Manager, this call also drew the gray 
desktop, thus giving the impression that the Finder was taking a long time 
to start up, when really the application was still quitting.


Larry Rosenstein, Apple Computer, Inc.
Object Specialist

Internet: lsr@Apple.com   UUCP: {nsc, sun}!apple!lsr
AppleLink: Rosenstein1

jackiw@cs.swarthmore.edu (Nick Jackiw) (05/11/89)

In article <3207@ncar.ucar.edu> cruff@handies.UCAR.EDU (Craig Ruff) writes:
> In article <8705@boulder.Colorado.EDU> stevens@boulder.Colorado.EDU (Curt Stevens) writes:
> >I am wondering why sometimes applications launch quite quickly and other
> >times it takes quite a while. 
> I just saw this very same thing happen yesterday.  I had just mounted a couple
> of NFS file systems via a GatorBox.  Then I started a small application.
> It took a minute easily before the name appeared on the menu bar.  During
> that time, the little AppleShare arrows were visible.  I don't know what
> was going on.

A couple of things were going on.

Don't forget, first off, that when you launch an application, you aren't
just entering that application, you're leaving the finder first. Finder
may need to do some cleaning up, such as emptying the trash, saving the
position of any open folder or volume windows which have changed since
its last use, etc.  So the more time you spend diddling in Finder, the
more time likely it will take to leave.

With the file servers, all of this takes much longer. Emptying the trash
of a file located on the server, or launching an application which--no 
matter how small--is remotely stored are almost always going to take
more time than if done on your local volumes, because not only does the
remote volume have to perform all the same functions as the local one, but
it also has to communicate with local to schedule those tasks, etc.

Lastly, even given all this, I must admit I'm often perplexed by the
erratic rates of application launchings.


-- 
     _  _|\____    Nick Jackiw | Visual Geometry Project | Math Department
   / /_/   O>  \   ------------+-------------------------+ Swarthmore College
   |       O>   |  215-328-8225| jackiw@cs.swarthmore.edu| Swarthmore PA 19081
    \_Guernica_/   ------------+-------------------------+                 USA