preload files, fast application launch

Posted:
in Genius Bar edited January 2014
Hi,



I apologize for posting this because I know similar things have been posted before, but I can't find where they are.



Anyway, I remember reading about a way to speed some application launch times by having the system pre-load certain files related to that app at startup.



In my particular example, I want to do this with Appletviewer.



How can I do this?



My normal routine is like this:

Type some java code in BBEdit.

Run javac in the terminal to compile it.

Run appletviewer in the terminal to view it.

Quit appletviewer.

Repeat.



Sadly, appletviewer starts up pretty slow and I'd like to be able to speed this up if at all possible.

Comments

  • Reply 1 of 10
    ebbyebby Posts: 3,110member
    Mozilla does this on my PeeCee, but it takes built-in processor cache to speed it up. I my mac takes about the same time to start an application over and over, as it did the first time I ran it. Therefore, the speed increase will not apply.



    EDIT: Well, new macs now have bigger back-side caches on the chips so that may help. But, come on Apple, 68K (or something like it) of level 1 cache! How about 256K or even 512K like some PeeCee processors. I am not a fan of back-side level 3 cache. <img src="graemlins/oyvey.gif" border="0" alt="[No]" /> Put more cache on the die.



    [ 10-10-2002: Message edited by: Ebby ]</p>
  • Reply 2 of 10
    as a general piece of information about CPU design: larger cache does not always equate to faster performance or 'better'. Associativity level, and frequency have just as much to do with it... as do other things... Sometimes a small, fast cache is better on die, leaving die space for other things - or just keeping the die small to keep the chip cheap - to keep the price/perf ratio good....... also, it all depends on the application... but what do I know...
  • Reply 3 of 10
    torifiletorifile Posts: 4,024member
    [quote]Originally posted by rogue27:

    <strong>Quit appletviewer.

    Repeat.



    Sadly, appletviewer starts up pretty slow and I'd like to be able to speed this up if at all possible.</strong><hr></blockquote>



    This doesn't answer your question, but is there a particular reason that you're quitting applet viewer in between runs? You could just leave it open.
  • Reply 4 of 10
    rogue27rogue27 Posts: 607member
    [quote]Originally posted by torifile:

    <strong>



    This doesn't answer your question, but is there a particular reason that you're quitting applet viewer in between runs? You could just leave it open.</strong><hr></blockquote>



    Yes, you have to. Closing the window quits appletviewer. If I don't quit, I can't use that terminal window anymore. ( I run appletviewer from the terminal)



    [quote]Originally posted by Ebby:

    <strong>But, come on Apple, 68K (or something like it) of level 1 cache! How about 256K or even 512K like some PeeCee processors. I am not a fan of back-side level 3 cache. Put more cache on the die.</strong><hr></blockquote>



    What? Did you forget about L2 cache? Current G4s have 256k of on-chip full-speed L2 cache, and current G3s have 512k. The G4s also have L3 for added performance (less bus traffic).



    All chips have small L1 cache, and I think the L1 on the PPC chips is bigger than on x86 in general, but I could be wrong.



    [ 10-10-2002: Message edited by: rogue27 ]</p>
  • Reply 5 of 10
    [quote]Originally posted by rogue27:

    <strong>Yes, you have to. Closing the window quits appletviewer. If I don't quit, I can't use that terminal window anymore. (I run appletviewer from the terminal)</strong><hr></blockquote>



    homeslice, i'm about to rock your world. i aint all that familiar with appletviewer, but it seems that suspended and simul processes can help your situation. first, if u have a process on the CLI (command line interface, ie Terminal) that is monopolizing and aint givin up the shell, you can stroke control-z*, to `suspend` a process. the process is put on hold, and the shell is returned as per usual. to resume the process, type `fg`. if u have more than 1 suspended u may have to send some kind of param to fg.



    but, to preclude all the control-z/fg craziness, just put an ampersand on the end of ur line to run appletviewer, ex: `appletviewer url &`. that makes appletviewer run per usual, but keeps the shell open for business. you can do that to anything on the cli*. note that you lose standard in (stdin) tho, for the ampersand'ed app.



    now, as far as speeding up a prog by loading its files manually, i dont think theres a nice + easy way to do it. if the program is written to keep some kind of daemon open all the time, and have that take care of its files, then it might work; but you [the end-user] can't open a program's files for it without doing a lot of binary hacking. its not completely impossible, but the effort and time to do it would be astronomical (at least in the manner i'm thinking).



    footnote: *) by anything, i mean, only running programs, scripts, etc from the shell. and only some shells allow this, like tcsh, bash, sh, and many more. most *nix shells allow ampersanding, and the control-z/fg, i dont think the DOS shell has any comparable feature though.



    [ 10-10-2002: Message edited by: thuh Freak ]</p>
  • Reply 6 of 10
    ebbyebby Posts: 3,110member
    [quote]Originally posted by rogue27:

    <strong>What? Did you forget about L2 cache? Current G4s have 256k of on-chip full-speed L2 cache, and current G3s have 512k. The G4s also have L3 for added performance (less bus traffic).

    </strong><hr></blockquote>



    I didn't forget about the level 2 cache, but my guff is with level 3 and level 1. The processor looks to the level 1 cache first. If it finds a cache hit than all is good, but if it doesn?t, then it goes to level 2, then level 3. Each cache-miss takes time. Instead of having a huge level 3 cache, put a bunch of it directly on the chip and you will see a huge improvement.



    [quote]All chips have small L1 cache, and I think the L1 on the PPC chips is bigger than on x86 in general, but I could be wrong.<hr></blockquote>



    The level 1 cache of almost all G3 & G4 chips is 68K. Base-line Pentiums have around 128K and performance processors have up to 512K. The only difference between AMD's "Athlon" and "Duron" is the size of the cache. (And a price jump)



    [quote]Originally posted by grad student:

    <strong>... Sometimes a small, fast cache is better on die, leaving die space for other things - or just keeping the die small to keep the chip cheap...</strong><hr></blockquote>



    Unfortunately, keeping the price of the processor cheap is important to Apple, but having a computer design an extra 128K of cache into a processor really doesn?t cost that much. And at the price of some of those Pro Systems, it should come standard.



    Crazy Idea #731

    What if Motorola sold maxed-out, top-of-the-line, screaming processor upgrades. I would buy one and they would be expensive. :cool:
  • Reply 7 of 10
    No, I'm pretty sure the 128 - 512k of cache on intel chips is L2.



    Also, to the guy who posted above, the & thing lets me keep control of the termina, but appletviewer will still start another process and open up a new window taking just as long as the previous one, so that doesn't speed me up any. Thanks anyway. I vaguely remember the & thing from a class I had a few years ago.
  • Reply 8 of 10
    ebbyebby Posts: 3,110member
    I tried to go ot AMD's and Intel's websites, but got nowhere. (They give level 1 cache some BS name to make their processors sound cool and improved) still researching to back up my claim, but out of time today. <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" />
  • Reply 9 of 10
    baumanbauman Posts: 1,248member
    At least the P4 does something funny with the L1 cache. It puts part of it halfway through the pipeline. Because these "x86" chips actually have to decode the ancient x86 format, there is what they call a trace cache after the decoding. That way, if something needs to go through twice, it doesn't need to decode it twice (or that's the theory anyway)



    That may be why you aren't getting straight answers
  • Reply 10 of 10
    ebbyebby Posts: 3,110member
    Hmmmm. <img src="graemlins/bugeye.gif" border="0" alt="[Skeptical]" /> That does sound a bit like what's happening. If only Macs can use something like this. The only reason I use netscape 7 on a PC instead of my mac is because Netscape 7 loads in under 1 second on the PC. <img src="graemlins/hmmm.gif" border="0" alt="[Hmmm]" />
Sign In or Register to comment.