You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest LimitOffsetPagedList.java cache getTotalCount method result, so getList method may directly return empty list to avoid an unnecessary query when getTotalCount had done and It's result is equal to Zero.
The text was updated successfully, but these errors were encountered:
Not sure about this in that it's designed to be able to run the 2 queries in parallel. So I don't think it's worth it. If you want to prepare a PR for what you were thinking about I'd have a look?
Edit: Ok, got it - TLDR when totalRowCount has already been determined and is 0 then we can skip finding the list and return an empty collection for this case.
* #3370 LimitOffsetPagedList add getTotalCount cache
* Move totalRowCount check to inside the lock
* No change, format only on LimitOffsetPagedList
---------
Co-authored-by: Rob Bygrave <robin.bygrave@gmail.com>
I suggest LimitOffsetPagedList.java cache getTotalCount method result, so getList method may directly return empty list to avoid an unnecessary query when getTotalCount had done and It's result is equal to Zero.
The text was updated successfully, but these errors were encountered: