HomePhabricator

hgweb: render next pages on /graph incrementally

Authored by av6.

Description

hgweb: render next pages on /graph incrementally

Previously, when user scrolled down to see the next page on /graph, all hgweb
did was re-render everything that would be visible (by simply incrementing
revcount). It was not efficient at all, and this patch makes /graph page behave
similarly to the regular /log: every new page only consists of new changesets,
no duplication, and only jsdata is based on the full set of changesets required
to build accurate graph.

This is achieved by adding "?graphtop=<node>" to the next page URL template,
effectively remembering where the graph started, and using that value to create
the new tree that covers the whole visible graph. That variable is then used
to produce jsdata for redrawing graph client-side.

nextentry is used for the same purpose as on /log page (to format the next page
URL), but it's not a part of the graph.

Details

Committed
av6Dec 11 2017, 2:43 AM
Parents
rHGa48af4993aa0: hgweb: split graphdata() into jsdata() and nodes()
Branches
Unknown
Tags
Unknown