Solved

Pulling app code from cache vs. from disk

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

A lot of new and distinct gadgets are making their appearance every other day. The latest gadget that has wooed the attention of all gadget lovers and non gadget lovers alike is the Smartwatch. This tiny gadget is capable of offering live access to …
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

19 Experts available now in Live!

Get 1:1 Help Now