Re: [ognl] internal cache performance improvement

2011-06-07 Thread Simone Tripodi
Salut Henri!!! thanks a lot for your contribution!!! your suggestiona are indeed really useful and having a look at the packages you pointed is a big worth, thanks!!! Anyway, everybody feels comfortable on working on the cache is welcome, I'll fill an issue about it soit will be tracked, feel free

Re: [ognl] internal cache performance improvement

2011-06-07 Thread Simone Tripodi
Hi Mau, fine having such tests and fine you added the shade in a profile so it doesn't collide with the normal build process, but let's discuss about different topics in separate threads ;) Anyway, good job! All the best, Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On T

Re: [ognl] internal cache performance improvement

2011-06-07 Thread Maurizio Cucchiara
Hi, guys. I set-up the shade plugin inside the OGNL pom [1], which allows us to do some performance test on S2. WDYT? [1] https://issues.apache.org/jira/browse/OGNL-16 - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org

Re: [ognl] internal cache performance improvement

2011-06-07 Thread henrib
Hi Simo; You might want to take a look at jexl in the org.apache.commons.jexl2.internal.introspection and org.apache.commons.jexl2.internal packages for ideas, more specifically at IntrospectorBase. Jexl caching is roughly a hashmap keyed by classes whose values are (essentially) hashmap keyed on

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Maurizio Cucchiara
Forget about key collision, obviously there is no collisions fro a non-hash functions. On 7 June 2011 02:43, Maurizio Cucchiara wrote: > Simone, > >> a look at put( Class key, T value )[1] implementation of > > Aside that put method is public, IIUC the only class that calls "put" > is only the Og

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Maurizio Cucchiara
Simone, > a look at put( Class key, T value )[1] implementation of Aside that put method is public, IIUC the only class that calls "put" is only the OgnlRuntime one (and almost every time it invokes inside a sync block). > ClassCacheImpl: the whole block should be controlled by a concurrency > p

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Maurizio Cucchiara
2011 18:24, Jason Pyeron wrote: >> -Original Message- >> From: maurizio.cucchi...@gmail.com >> [mailto:maurizio.cucchi...@gmail.com] On Behalf Of Maurizio Cucchiara >> Sent: Monday, June 06, 2011 12:14 >> To: Commons Developers List >> Subject: Re:

RE: [ognl] internal cache performance improvement

2011-06-06 Thread Jason Pyeron
> -Original Message- > From: maurizio.cucchi...@gmail.com > [mailto:maurizio.cucchi...@gmail.com] On Behalf Of Maurizio Cucchiara > Sent: Monday, June 06, 2011 12:14 > To: Commons Developers List > Subject: Re: [ognl] internal cache performance improvement > >

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Maurizio Cucchiara
Gary hit the nail on the head, considering that OGNL usually runs in a multi-thread environment like struts, concurrency is a must. At first glance LRUMap would seem the appropriate choice (it was thought for this purpose), unfortunately LRUMap is not thread safe, surely we can wrap using Collectio

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Gary Gregory
Does concurrency need to be taken into account for the cache? If so, you need to consider how access to the cache will be synchronized. An intrinsic lock? A ConcurrentHashMap? and so on. Gary On Mon, Jun 6, 2011 at 2:36 AM, Simone Tripodi wrote: > Hi all OGNL folks, > my today's topic is about i

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Antonio Petrelli
2011/6/6 Simone Tripodi > TreeMap sounds reasonable, it's an RB Tree implementation and > insert/retrieve operations have both O(log n) complexity[1], I'd > suggest to start with it and see how things are going, then switch to > LRU if needed. > WDYT? Many thanks in advance! > +1, TreeMap is fin

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Simone Tripodi
Hi Antonio, thanks for reviewing and providing feedbacks! In the existing codebase I don't see any eviction policy, I wonder if that data structure purpose is not for storing large amount of data, but rather just a memory area where quickly looking-up already processed Class related data - I know t

Re: [ognl] internal cache performance improvement

2011-06-06 Thread Antonio Petrelli
2011/6/6 Simone Tripodi > my today's topic is about internal cache, that can be IMHO improved in > therms of performance; its implementation is a multi-value map alike, > based on a fixed-size array, a function is applied to each key to > calculate the array index, each array element is a Collect