On 15 Apr 2013, at 14:38, David Jordan <david.jor...@sas.com> wrote:
> > So every call to a method of Model or OntModel is done in a separate > transaction? This could easily explain the poor performance I am getting, and > those of others who have complained about SDB performance in this group. Poor performance typically has more to do with the cumulative overhead of large numbers of small operations than transactions per se. SDB tries to queue up added or removed triples in large chunks (c 20,000 triples), and execute them in a small number of RDB operations. Each call to add or remove will be a single chunk, so it's best to make them as big as possible. The model.notifyEvent(GraphEvents.startRead) business is a way to take some control of that queuing and allow the queue to cross method boundaries. So, for example: while (condition) { if (condition) model.add(statement); } would benefit immensely from being wrapped in start/finishRead. The problem is that you are queuing client side, so peeking at the contents of the model is a bad idea: the triples may not have been added. Damian