Cory Johns
The skip is basically pulling every commit up to the desired page, and then iterating through them until it finds the start of the page
Dave Brondsema
ah. we should fix that
Cory Johns
Problem is that it's hard, maybe impossible, to efficiently convert a skip to a start rev.
Dave Brondsema
oh
guess & iterate?
Cory Johns
Some of the SCMs support it, but only one of the tree
*three
Dave Brondsema
svn?
Cory Johns
I don't recall of the top of my head
Dave Brondsema
seems like since they're linear ints
Cory Johns
Yeah
Dave Brondsema
it'd still help
i'll ticket it up
Cory Johns
Though hg also has support for revisions-to-commits built-in, since the way it does branching is very different
We could certainly make the next paging efficient, since we'll know the last revision. But that won't help for jumping around pages
Oh, it wouldn't work for SVN either, though, because of the path param
You can't know a priori what commits touched a path
Dave Brondsema
ugh
Cory Johns
Hrm. If I added repo_ids to the new LastCommit model (would be nice to have anyway), then we could potentially get a list of all commits that touched a path with a single query. Might not be too inefficient. Then could cache that on the page to do paging with
Would only work for the repos that pre-compute the LCDs, but I'm not entirely convinced that our idea about SVN being too slow to pre-compute stuff on refresh is really valid
It's actually faster than git, in my experience
Since it doesn't have to hit a separate process
And it's especially fast for LCD, since it can pull all the LCD info in one request to SVN instead of having to walk up the tree
But, admittedly, my test case for SVN was smaller than my test case for git
We should also limit the max page size to constrain the runtime of this page. The default option of 250 is probably too high unless we can make a lot of speedups.
Diff:
Here's some example timing data where
svn_lib.log
is high.Pagination isn't really necessary. Can do just next instead by passing the next revision in the link.
allura:cj/5685
Paging changed, but I'm concerned that the code is loading the full
Commit
records, then throwing them away and re-loading them, for some repo implementations. That needs to be improved. The performance of the log is still slow, though it won't grow for later "pages" anymore.Change back to calling external git tool pushed as metrics and reimplementation preventing flattening of the entire call history show an order of magnitude improvement. Also applied the change to LastCommit which also shows an order of magnitude improvement. This will need to be done for ForgeHg as well, but the flattening issue needs to be fixed first.
allura:cj/5685
forgehg:cj/5685
Looks good for hg & svn. Cory said he'd squash some of the LCD related commits
"Older" link should go to the next commit and not repeat the last commit on the current page (although I saw a few cases where it wasn't actually doing that either). That will also let us stop the pagination when we're at the very last commit.
allura:cj/5685
forgehg:cj/5685
I tried to refactor the affected tests out of ForgeHg and into Allura, but couldn't come up with a way to do so. I could put them in ForgeGit, but that would only be marginally better.