Thanks Chetan, I haven’t noticed the length() invocation in the createBlob(). It seems that the LengthCachingDataStore is something I was looking for.
Best regards, Tomek -- Tomek Rękawek | Adobe Research | www.adobe.com reka...@adobe.com > On 29 Feb 2016, at 14:35, Chetan Mehrotra <chetan.mehro...@gmail.com> wrote: > > On Mon, Feb 29, 2016 at 6:42 PM, Tomek Rekawek <reka...@adobe.com> wrote: >> I wonder if we can switch the order of length and identity comparison in >> AbstractBlob#equal() method. Is there any case in which the >> getContentIdentity() method will be slower than length()? > > That can be switched but I am afraid that it would not work as > expected. In JackrabbitNodeState#createBlob determining the > contentIdentity involves determining the length. You can give > org.apache.jackrabbit.oak.upgrade.blob.LengthCachingDataStore a try > (See OAK-2882 for details) > > Chetan Mehrotra