lift / lift/framework

Add caching to Paginator

Open
#868 2 comments 0 reactions 1 assignee Claimed by @dchenbecker View on GitHub
P:Normal T:Enhancement
Dominant language
Scala
Stars
1.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

Original email:

> While I was testing for #616 I ran into some really awful performance with pagination. The root cause is that H2 is taking a long time on queries, but the fact that the "count" and "page" members in Paginator are defs means that I was hitting the slow query multiple times for each render (8 times for "count" in my read of the code). I was wondering if we should go optionally cache the result of "page" in a RequestVar and base "count" on that to avoid hitting the database so many times. Yes, DBs have query caches and other things that should mitigate this, but still that's at least 8 round trips to the database for every page view.

Per DPP this should use a TransientRequestVar

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.