New Posts New Posts RSS Feed: Managing the size of a Persistence Manager
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Managing the size of a Persistence Manager

 Post Reply Post Reply
Author
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Topic: Managing the size of a Persistence Manager
    Posted: 12-Jul-2007 at 4:02pm

5) Managing the size of a Persistence Manager 

Are there any guidelines on how the size of the Persistence Manager should be controlled?  Obviously the contents of the local cache fills up over time. Is the standard practice for keeping a handle on it's size, or is it something we have to control within the system?

I look forward to reading your comments

Back to Top
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Posted: 12-Jul-2007 at 4:03pm
 

I actually don’t know very many customers who religiously pay attention to PM size, but if you do have a very large cache, here are some tips that you may find helpful:

 

(1)                 I’d recommend that you not start worrying about this problem until it actually happens.  This is my recommendation, in general, on performance problems.  You can waste a lot of time engineering solutions to problems that may never occur.

(2)                 If you know that a set of entities will not be reused in your application, you may decide to remove them from the cache (by using PM.Remove).

(3)                 The same strategy applies if you think that it is extremely unlikely that you will reuse some entities.

(4)                 A separate Persistence Manager may help you.  For example, if you are doing a large and complicated query, you might use a separate PM.  After you have performed the query, you might import the few entities you care about to your default PM.

(5)                 It is non-trivial to Clear or Remove entities from the cache. Although it is easy enough to remove the entities themselves from the cache, it is not always so easy to manage all of the things that reference the entities.  For example, you have to worry about EntityLists, Event Handlers, Property Descriptors (to name just a few).  If you miss one of these references, your application may crash mysteriously at some later point.

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down