On 8/3/11 14:38 , Niclas Hedhman wrote:
Hi

I am trying to lean up the RDF shutdown sequence, and while looking
into that I noticed two things;

  * There is an intermediary "commit" between the 'remove Entities' and
'update+new entities'. Why isn't this in a single commit?

I think it is because "remove" actually handles updated RDF as well, i.e. it clears it away so that updated RDF can replace it. Without the remove in between I don't think it would work. But try and see what happens.

  * More importantly, for each call to the
StateChangeListener.notifyChanges(), the RDF indexer opens and closes
the connection to the RDF Repository. Exactly how intensive that
operation is, is hard to follow. Is there any reason why we actually
do this, or should we keep the connection open?

One reason is due to concurrency, I think, as you don't want to share a connection between threads. It's a fairly lightweight thing anyway, AFAICT, so shouldn't be any problem.

But again, try and see what happens. IF you do, add synchronized{} around all of it though, to avoid concurrent use of the connection

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to