Solved

Pulling app code from cache vs. from disk

Posted on 1999-01-28
4
253 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Information security is a multi-billion dollar industry. Just as lucrative is the black market industry which trades stolen identities, credit card numbers and software exploits all over the world. Nothing is hack-proof. The best one can do is make …
Worried about if Apple can protect your documents, photos, and everything else that gets stored in iCloud? Read on to find out what Apple really uses to make things secure.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

752 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