Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Alexander Klimetschek
On 03.03.2013, at 00:05, Miroslav Smiljanic smmiros...@gmail.com wrote: Currently if A adapts to [B, D], and B adapts to [C], adapter manager will not adapt A to C even if it is potentially possible. AdapterManager.getAdapter method has to be called twice. I have done some code

Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Felix Meschberger
Hi Am 04.03.2013 um 12:16 schrieb Alexander Klimetschek: On 03.03.2013, at 00:05, Miroslav Smiljanic smmiros...@gmail.com wrote: Currently if A adapts to [B, D], and B adapts to [C], adapter manager will not adapt A to C even if it is potentially possible. AdapterManager.getAdapter

Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Miroslav Smiljanic
Hi Alex, Felix Thanks for sharing your thoughts. The real magic was to implement cache of adapter factory descriptors, indexed by adaptable and adapter, and to maintain that. It works really well btw. Proposed implementation change would just query that cache more that once, what is currently

Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Bertrand Delacretaz
On Mon, Mar 4, 2013 at 5:38 AM, Miroslav Smiljanic smmiros...@gmail.com wrote: ...Proposed implementation change would just query that cache more that once, what is currently done Yes, but from the user's point of view there's the additional magic of a transitive chain of adapters. I agree

Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Carsten Ziegeler
2013/3/4 Bertrand Delacretaz bdelacre...@apache.org: On Mon, Mar 4, 2013 at 5:38 AM, Miroslav Smiljanic smmiros...@gmail.com wrote: ...Proposed implementation change would just query that cache more that once, what is currently done Yes, but from the user's point of view there's the

Re: [Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-04 Thread Miroslav Smiljanic
Hi Carsten, Apart from this too much magic, I guess the implementation might really have a negative impact on performance unless you limit the transitive search to one level. Yes, it has complexity of tree traversal, and idea was to limit look up to certain number of levels. But I guess that

[Adapter] Make AdapterManager.getAdapter transitive operation

2013-03-02 Thread Miroslav Smiljanic
Hi all, Currently if A adapts to [B, D], and B adapts to [C], adapter manager will not adapt A to C even if it is potentially possible. AdapterManager.getAdapter method has to be called twice. I have done some code modifications and made operation transitive. Do you think that it would be