[infinispan-issues] [JBoss JIRA] Commented: (ISPN-815) Clone caches should be created and started much faster
Galder Zamarreño (JIRA)
jira-events at lists.jboss.org
Thu Dec 2 04:07:05 EST 2010
[ https://jira.jboss.org/browse/ISPN-815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566773#comment-12566773 ]
Galder Zamarreño commented on ISPN-815:
---------------------------------------
I ran some quick tests and cloning a Cache would be something rather complex and difficult to test that it works as expected. In principle, the key thing would be to clone the ComponentRegistry, but although doable now, all it does is create a copy that points to the components of the original CR. So, you'd have to start taking each individual component and make it clonable, making sure no refs to the original components are left, otherwise you could get some nasty behaivour. Making sure it all works fine would as well be difficult to verify 100%.
> Clone caches should be created and started much faster
> ------------------------------------------------------
>
> Key: ISPN-815
> URL: https://jira.jboss.org/browse/ISPN-815
> Project: Infinispan
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 4.2.0.CR2
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Fix For: 4.2.0.Final
>
> Attachments: CacheStartProfile.png, StressCacheCreationTest.java
>
>
> We must be faster creating caches that are just simply copies of the same configuration.
> Creating 500 caches of the default cache configuration takes around 4 seconds.
> Creating 1000 caches takes around 10 seconds.
> This is too slow. As shown in the profiler screenshot, calling componentRegistry.registerComponent(spi, AdvancedCache.class); is quite expensive.
> The start procedure is also quite expensive, specially due to some reflection going on there.
> IMO, we need fast way to clone caches. IOW, if you create Cache A based on config default config, creating/starting Cache B based on default config should be extremely fast. Simply duplicate objects and set them in the right state.
> This is of particular importance in 2LC use cases where each entity/collection is stored in a separate cache and these are generally created on startup by the Hibernate Session Factory.
> Check the linked user forum post for some feedback from a 2LC user.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list