On Wed, Mar 18, 2009 at 10:00 PM, Marcel Reutegger <[email protected]> wrote: > I think this is an interesting idea. there are several locations in > the query handler code where a hierarchy manager is created for the > shared item state manager. Instead of creating new instances over and > over again, it would be more efficient to reuse a shared instance.
agreed. > > how about adding a method to the ItemStateManager that will return a > HierarchyManager. depending on the implementation it may return a > CachingHierarchyManager or just the plain one. hmm..., my gut feeling says that an ISM shouldn't know about hierarchy... > > or as an alternative, add a caching hierarchy manager to WorkspaceInfo. +0.5 ;) there's been quite a few tricky CachingHierarchyManager-related issues in the past [1]. while i agree in general that a per WorkspaceInfo hierarchyManager would be a good idea i am somehow afraid of introducing new issues... cheers stefan [1] http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&&query=CachingHierarchyManager&summary=true&description=true > > regards > marcel > > On Wed, Mar 18, 2009 at 18:40, defeng <[email protected]> wrote: >> >> But in ShareISM, when creating EventStateCollection, it still uses >> session-scope HierarchyManager to getPath(id). >> >> In my test, I found getPath(id) was a very expensive method, that's why i >> want to cache the id-path map in shared-scope. >> >> Regards, >> >> >> >> Stefan Guggisberg wrote: >>> >>> On Wed, Mar 18, 2009 at 2:14 PM, defeng <[email protected]> wrote: >>>> >>>> Currently, the CachingHierarchyManager is per session. Is it possble to >>>> save >>>> the id-path map in SharedISM? >>> >>> no. CachingHierarchyManager reflects session-scoped hierarchy information >>> (i.e. including transient state) whereas SharedISM has global workspace >>> scope >>> and is not tied to a session. >>> >>> cheers >>> stefan >>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Add-id-map-and-path-map-in-SharedISM--tp22578913p22578913.html >>>> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. >>>> >>>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Add-id-map-and-path-map-in-SharedISM--tp22578913p22584572.html >> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com. >> >> >
