Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pulling app code from cache vs. from disk

Posted on 1999-01-28
4
Medium Priority
?
265 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 600 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

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

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

In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

715 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