Solved

Pulling app code from cache vs. from disk

Posted on 1999-01-28
4
242 Views
Last Modified: 2013-11-13
This question was posed to me, so I'm hoping somebody might have some clue: does anybody know the advantages/disadvantages of a Mac application pulling code from cache vs. pulling it from the hard drive every time the app is run? Any hints, ideas, etc? Tough question, I know, hope the points are sufficient to get you thinking. Thanks, Adam.
0
Comment
Question by:Dyrewolf
  • 2
4 Comments
 
LVL 4

Expert Comment

by:nax
ID: 1538449
If I understand your question correctly, the main difference is speed.

Pulling codes from the cache (RAM) is a lot faster than getting it from the Hard disk everytime you use it since RAM is electronic and Hard disk is basically mechanical.  Using cache also helps to extend the life of your Hard disk since you only have to load the codes once, after that your Hard disk can rest and it's up to the cache to do the hard work.

The only disadvantage i can see is when you have very limited RAM. Using a large cache would lessen your total useable RAM which could lessen your ability to open other RAM-eating applications.

good luck!

nax
0
 

Author Comment

by:Dyrewolf
ID: 1538450
I was actually looking for a lower level answer, I think something to do with the nature of reloading applications' resource fork from cache. I got enough of an answer elsewhere to get by, but thanks anyway. Adam...
0
 
LVL 1

Accepted Solution

by:
The_Raven earned 200 total points
ID: 1538451
That is a trick question...
For a Mac 68k, which does load code segments from the resource fork (Code 0 first and then as needed) the segment that is being will stay in memory until it's not in use and some other resource needs to take it's place.

For a PPC, the entire code set is loaded from the data fork and assembled as handles in high memory, it never leave memory or gets cached... (not to say that the PPC chips instruction cache isn't storing some instructions).

As far as the low level stuff and design... I would put constanly used routines in small code segments, this will help insure that they will get cached and stay there.
0
 

Author Comment

by:Dyrewolf
ID: 1538452
Sweet. That's basically what I was looking for...Adam
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apple Mail Hyperlinks 3 25
Cannot connect Apple TV 4 to local wifi network 2 105
Macbook Hard Drive Issue 23 104
How to download an Apple App onto a PC 3 62
A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now