Re: EOF related objects present a lot in the heap
Re: EOF related objects present a lot in the heap
- Subject: Re: EOF related objects present a lot in the heap
- From: Ramsey Gurley <email@hidden>
- Date: Mon, 29 Apr 2013 08:18:21 -0700
On Apr 28, 2013, at 3:55 PM, Chuck Hill wrote:
>
> On 2013-04-26, at 2:55 PM, Joseph Pachod wrote:
>
>> Thanks a lot all for your answers. I'm new to the application I'm working, as well as EOF/WebObjects/Wonder, so excuse my naive questions and maybe incomplete answers.
>>
>> To put a bit of context, the application is a quite large one, spanning for more than a decade and quite some developers. So while I'm not afraid of changing stuff, anything which can't be done easily at a large scale is bound to be impossible to do (since being too much work if it cannot be automated in some ways).
>>
>> @Chuck Hill
>> Regarding your suggestion, I haven't seen the talk in question (I looked for them, found 4, none speaking of this technique as far as I got it). Yet I'll check this option with our architecte in chief, because I'm unsure about the lifecycle of our pages (I would they they're created once and then reused if the same page is entered different times, so just the ec creation would be needed at different places. On the other hand, success/Cancel would be trivial to deal with).
>
> An easy way to do this is to create an EC per page and keep your page cache small, 5 or less. When the page falls out of the cache it is garbage collected along with its EC.
>
>
>> removeAllActions() is already properly called.
>>
>> On a more general level, I don't really get how the snapshot cache cleans itself up. My current understanding is that it keeps a snapshots of everything it put an hand on. These snapshots are then released only when the editing context is disposed (or garbage collected). Is this right ? Is there really no way to clear a bit this cache in between ?
>
> The snapshots are referenced counted. When the last EO using the snapshot is refaulted or garbage collected, the snapshot is discarded. There is no way to accelerate this and I doubt it would be overall beneficial to do so. That would just increase the database traffic to re-generate the snapshot.
>
> Chuck
Just wanted to add that this behavior can be overridden by setRetainsRegisteredObjects. If you're working with nested ECs, then retaining the objects fixes some strange errors resulting from premature garbage collection of referenced objects. The default behavior is what Chuck described.
>
>>
>> @Henrique
>> We rely on validation, so we would prefer to keep it.
>>
>> @Ramsey:
>> I've used wicket in my previous life, so going for such mechanism really rings a bell here. I'm currently looking for low hanging fruits before digging deeply into it: it's for sure on the radar. A pity though it wasn't used in production yet... Furthermore, we deploy on our customers servers: we can't easily tweak the db. Was the ERPersistentSessionStorage thought for different persistence mechanisms (file store, memcached) ?
>>
>> Thanks again you all :)
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> --
> Chuck Hill
> Executive Managing Partner, VP Development and Technical Services
>
> Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/gvc/practical_webobjects
>
> Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
> Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden