Hi,

As a user of the JCR API, I wouldn't expect getSize to potentially take
multiple minutes. So following the principle of least surprise, I wouldn't
want that. 


I think we did do that before, (never return -1), and run into performance
problems because some application / tools call getSize() quite often. I
turned out the method was called for cases where it's not needed. In other
cases, the caller can deal with -1, and assumes the method returns that
value.

Regards,
Thomas



On 30/07/14 10:13, "Jukka Zitting" <[email protected]> wrote:

>Hi,
>
>On Wed, Jul 30, 2014 at 2:54 AM, Thomas Mueller <[email protected]> wrote:
>> I think "order by @jcr:score desc" is very common, and is needed for
>>many
>> cases where you don't care about the result set size. Jukka, why do you
>> think it should trigger the full result set read (to calculate the
>>size)?
>
>I think it should, in cases when the client explicitly calls
>getSize(). If the client doesn't care about the size, it presumably
>won't call getSize().
>
>BR,
>
>Jukka Zitting

Reply via email to