You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Steve Vestal <st...@galois.com> on 2023/06/14 12:38:37 UTC

Performance of rebinds after multiple changes?

The help pages say a rebind will happen automatically when things are 
added or removed to an OntModel (except odd cases).  I'm curious about 
the performance impact when a sequence of multiple changes are made.  Is 
the rebind itself fast, so a sequence of changes and rebinds has no 
significant performance impact until the next request for information?  
If not, would Model add(Statement[] statements) and Model 
remove(Statement[] statements) do a single rebind for a batch of changes?


Re: Performance of rebinds after multiple changes?

Posted by Dave Reynolds <da...@gmail.com>.
Hi Steve,

On 14/06/2023 13:38, Steve Vestal wrote:
> The help pages say a rebind will happen automatically when things are 
> added or removed to an OntModel (except odd cases).  I'm curious about 
> the performance impact when a sequence of multiple changes are made.  Is 
> the rebind itself fast, so a sequence of changes and rebinds has no 
> significant performance impact until the next request for information? 

Yes, rebind() is very cheap, it just sets a flag (or rather unsets the 
isPrepared flag). So it's not until the next query that the work will be 
redone.

Dave