forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <william...@gmail.com>
Subject Re: [jira] Updated: (FOR-1031) Switch to EHCache for Locationmap Cache
Date Sat, 21 Feb 2009 01:17:03 GMT
On Fri, Feb 20, 2009 at 1:13 AM, David Crossley <crossley@apache.org> wrote:
> Tim Williams wrote:
>> Anyone had a chance to check this out?  I'll go ahead and apply it but
>> since some of the earlier problems only occurred under stress
>> conditions, I wanted to give an opportunity for others to test too.
>
> I made some time to try it today. However i don't know what
> is a good test nor what to look for. Anyway i tried building
> the Forrest docs at "site-author" with the level for locationmap
> logging set to DEBUG.
>
> Before it took about 4 minutes to build.
> After adding your LM patch it takes about 2.5 minutes.

I'm surprised the locationmap is being used on enough duplicate
requests to make that much of a difference in static mode, that's
pretty good.

> Do you have a reference to the "stress conditions" that
> you refer to above?

Yeah, I was specifically referring to Thorsten's synchronization
problems before.  Our old cache was a bit of a hack and Thorsten
patched it by synchronizing certain accesses.  We knew then that it
was a short-term solution. He's got tests that do run numerous threads
and cause the problem he was seeing, so I thought it'd be helpful to
use those tests for this.  It should be much more capable in a
multi-threaded environment.

> Do we need a default ehcache configuration file?
> Where does it get placed?

Yeah, we should.  I'll try to get to that too, likely in the source
directory but as long as it makes it on the classpath all is well.

> Does that configuration file affect the main Cocoon
> cache which has some configuartion via main/webapp/WEB-INF/cocoon.xconf
> and main/webapp/WEB-INF/properties/core.properties ?

No, it shouldn't. Cocoon, AFAIK has created a 'store' abstraction to
their cache, which happens to be backed by ehcache.  Those properties,
cocoon.xconf in particular, are used for programmatically creating
their store.  In other words, I *think* even if an ehcache file were
on the classpath, they'd effectively ignore it for anything but
default values - which effectively means it'd be totally ignored.  A
long way of saying, I think we're safe - but I'm going from memory on
much of this so maybe someone with deeper Cocoon knowledge could
confirm this though?

> Sorry for more questions rather than much help.

No, this was good, Thanks David
--tim

> -David
>
>> >     [ https://issues.apache.org/jira/browse/FOR-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
>> >
>> > Tim Williams updated FOR-1031:
>> > ------------------------------
>> >
>> >    Attachment: lm_cache.diff
>> >
>> > Remove the simple all-or-nothing map cache for ehache.
>> >
>> >> Switch to EHCache for Locationmap Cache
>> >> ---------------------------------------
>> >>
>> >>                 Key: FOR-1031
>> >>                 URL: https://issues.apache.org/jira/browse/FOR-1031
>> >>             Project: Forrest
>> >>          Issue Type: Improvement
>> >>          Components: Locationmap
>> >>            Reporter: Tim Williams
>> >>         Attachments: lm_cache.diff
>> >>
>> >>
>> >> Should be an easy switch and get much better cache support/configuration
options.  Expiry of cache can be per-element vs. the current implementation where it expires
in its entirey.  It will make the LM stuff much cleaner too.
>> >
>> > --
>> > This message is automatically generated by JIRA.
>> > -
>> > You can reply to this email to add a comment to the issue online.
>> >
>> >
>>
>

Mime
View raw message