- **status**: review --> in-progress
- **Comment**:
Found one small issue. If default branch is in first 10 branches returned by
`self.repo.get_branches()` you'll see two buttons for it in the sidebar (this
isn't true when you have only one branch)
------
And a test failure:
~~~~
======================================================================
FAIL:
forgegit.tests.functional.test_controllers.TestFork.test_merge_request_list_view
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/var/local/env-allura/lib/python2.7/site-packages/nose-1.3.4-py2.7.egg/nose/case.py",
line 197, in runTest
self.test(*self.arg)
File
"/home/ibondarenko/ibondarenko-1154/forge/ForgeGit/forgegit/tests/functional/test_controllers.py",
line 585, in test_merge_request_list_view
assert_equal(r.html.findAll('span')[8].getText(), 'less than 1 minute ago')
AssertionError: u'foo' != 'less than 1 minute ago'
-------------------- >> begin captured stdout << ---------------------
Running setup_app() from allura.websetup
http://localhost/p/test2/code/do_request_merge
==> 302 ==> http://localhost/p/test/src-git/merge-requests/1/
~~~~
------
Also, I don't sure there are any improvements on performance. I've imported
allura repo itself for testing. I'm looking at `stats.log` and don't see any
improvement in `sidebar` timings.
On master (timings fluctuate around 4200 in most cases):
~~~~
"sidebar": 5145,
"sidebar": 4145,
"sidebar": 4211,
~~~~
On a branch (sometimes even slightly worse, seems like it randomly spikes. 4000
then almost ~6700):
~~~~
"sidebar": 6514,
"sidebar": 3916,
"sidebar": 6730,
~~~~
(Hitting `/p/allura/allura/ci/master/tree/` page)
Could you describe how did you measure it? Maybe I'm missing something?
---
** [tickets:#7873] Git branch & tag speedups**
**Status:** in-progress
**Milestone:** unreleased
**Labels:** performance sf-current sf-4
**Created:** Fri Apr 17, 2015 09:23 PM UTC by Dave Brondsema
**Last Updated:** Thu May 07, 2015 02:22 PM UTC
**Owner:** Heith Seewald
I saw that git pages on forge-allura.apache.org were slow, so I looked at
stats.log and saw that the sidebar was the slowest part. I did some additional
digging and found 2 specific areas for improvement:
* in `git_main.py` change `default_branch_name` to a `@LazyProperty` since it
is called many times inside a loop in `RepositoryApp.sidebar_menu`
* Since `sidebar_menu` only requests a certain number of branches, pass that
"limit" all the way through to `git_repo.py`'s `branches` method so that
`is_valid()` is only called a minimum number of times needed.
* make sure the default branch logic to put it at the top of the list still
works (e.g. always put it at the top first)
In addition to those changes, generalize and apply the same approach to the
tags. And also check ForgeHg to see if mercurial can benefit the same way.
---
Sent from forge-allura.apache.org because [email protected] is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.