Solved

Pulling app code from cache vs. from disk

Posted on 1999-01-28
4
259 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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

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 …
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

632 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