-
1. Re: Performance problems with Infinispan connector
craigching Sep 20, 2010 5:24 PM (in response to craigching)I'm running a profile session on this test right now and I'm seeing the big hitter (during the session save operation) to be:
org.modeshape.graph.connector.base.MapTransaction$Children.get(int)
Children.get() makes calls to two other List.get(int) methods. One of them, cache.get(), looks fine because cache is an ArrayList. The other, uuids, is passed in to the contstructor and appears to come from NodeType.getChildren(). I'm starting to track that down, but it feels like maybe the uuids list is not a list that provides a constant time get() operation ...
-
2. Re: Performance problems with Infinispan connector
craigching Sep 20, 2010 5:28 PM (in response to craigching)Indeed, uuids in my example is a LinkedList. So, any idea how to fix that?
-
3. Re: Performance problems with Infinispan connector
craigching Sep 20, 2010 6:03 PM (in response to craigching)Changing all the LinkedList in org.modeshape.graph.connector.base.MapNode to ArrayList solved this problem. Not sure if it causes any others though. I still do see a slight degradation of performance as more and more nodes are added to the repository, I'll see if I can track that one down too.
-
4. Re: Performance problems with Infinispan connector
rhauch Sep 21, 2010 1:54 AM (in response to craigching)Thanks for diving into this! I don't think it'd be a problem to add use ArrayList, though I'd have to see what the impact would be. We'll need a JIRA to encompass any changes, so feel free to open one. If you'd like to share a patch with your (proposed) changes, just attach to the JIRA.
-
5. Re: Performance problems with Infinispan connector
craigching Sep 21, 2010 9:56 AM (in response to rhauch)I've created https://jira.jboss.org/browse/MODE-903 for this problem. I'm not sure if my current company will allow me to submit a patch, I'm going to go check into that now, but this one is very trivial to reproduce (see my example) and fix, assuming the change from LinkedList to ArrayList doesn't cause other performance problems where a constant time add/remove would be required.
-
6. Re: Performance problems with Infinispan connector
meetoblivion Sep 21, 2010 11:13 AM (in response to craigching)Hi, I can add a patch for this. I'm doing a bunch of work on the infinispan connector as well, and have noticed this issue too in our production environment.