Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 months ago

#11971 closed enhancement (fixed)

Improve git repository performance

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.6
Component: plugin/git Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
  • Improve git repository connector
    • Fixed pretty slow if a git repository has many branches
    • Cache tags to avoid executions of git process in get_tags()
    • Check whether a repository is modified using git show-ref
  • Reduce retrieving changes of a changeset from twice to once in changeset view
API Changes:
Internal Changes:

Description

We often use log: links with git repository in ticket. The ticket view with the links is too slow. We should improve the performance of git repository.

  1. The git connector constructs revisions cache for parents, children, branches and tags. The construction is performed each request if persistent_cache option is disabled. We could improve it.
  2. The revisions cache is created each request if repository is not modified. Caching refs using git for-each-ref and detecting the modification could reduce times of the creation.
  3. git for-each-ref is executed to the number of shown changesets in log view. Caching name and revision of tags could avoid the executions.

Attachments (0)

Change History (4)

in reply to:  description comment:1 by Jun Omae, 9 years ago

Owner: set to Jun Omae
Status: newassigned
  1. The git connector constructs revisions cache for parents, children, branches and tags. The construction is performed each request if persistent_cache option is disabled. We could improve it.

Especially, that's pretty slow if a repository has many branches.

Proposed changes in [4c265be70/jomae.git].

before after
jomae.git 3077.2ms 291.9ms
libgit2 1182.7ms 393.4ms

in reply to:  description comment:2 by Jun Omae, 9 years ago

  1. git for-each-ref is executed to the number of shown changesets in log view. Caching name and revision of tags could avoid the executions.

Proposed changes in [bcc519c7c/jomae.git].

Timing of log view with the following repository.

before after
jomae.git 2709ms 1097ms
libgit2 2755ms 1248ms
Last edited 9 years ago by Jun Omae (previous) (diff)

in reply to:  description comment:3 by Jun Omae, 9 years ago

  1. The revisions cache is created each request if repository is not modified. Caching refs using git for-each-ref and detecting the modification could reduce times of the creation.

In [03c1d875c/jomae.git], detects that git repository is modified using git show-ref and creates revisions cache only when it is modified.

comment:4 by Jun Omae, 9 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [13951] and merged to trunk in [13952].

I noticed changeset view retrieves changes of the changeset twice. In [13953], reduced to once.

Last edited 9 years ago by Christian Boos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.