Exploration: lazily load 2-step funnel on first render#6273
Conversation
|
40a11b0 to
cd44aea
Compare
zoldar
left a comment
There was a problem hiding this comment.
Nice work civilising the API with those opts.
| url.apiPath(site, '/exploration/interesting-funnel'), | ||
| dashboardState, | ||
| {} | ||
| { max_steps: 2, max_candidates: 6 } |
There was a problem hiding this comment.
JFTR, at least for the current implementation(s) of the exploration, whether we fetch 6 or 20 candidates does not really affect query performance that much.
There was a problem hiding this comment.
Yeah, I think so. The majority of work is done in the 2 innermost queries where ordering must happen on the whole resultset. Also, sort of counter-intuitively, the longer the funnel, the more performant the query because more of the transitions are filtered out early. Selecting from the sorted set is a tiny factor (that is unless you fetch by the thousands where the payload size/serialization and deserialization overhead might be more relevant)
Changes
To make the exploration more encouraging to play with, we'll be preloading some funnel guesswork in "Explore" section by default. Defensively, we'll also query a smaller number of step candidates while building it.
Tests
Changelog
Documentation
Dark mode