Patch #1482

patch to improve performance when importing large git projects

Added by Brian Taylor over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-06-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8

Description

Redmine exhausted all the memory available on my linode when I tried to import the linux-2.6 git. The problem lies in the import using the "revisions(..)" interface of AbstractAdapter to build an array of all the revisions the project before inserting the changesets into the database. This is a serious problem with the kernel's 90K+ revisions. This patch creates a new git specific method, rev_revisions, that iterates the changes in reverse order so that they can be immediately inserted. These changes affect only git users.

I think a better, long term solution, would be to change revisions in AbstractAdapter to support being called with a block and a :reverse option. I'd be happy to take this on if anyone official blesses the effort.

rev_revisions.patch Magnifier (4.15 KB) Brian Taylor, 2008-06-17 02:49

Associated revisions

Revision 1599
Added by Jean-Philippe Lang over 9 years ago

Reduces memory usage when importing large git repositories (#1482).

History

#1 Updated by Jean-Philippe Lang over 9 years ago

  • Category set to SCM
  • Status changed from New to Closed
  • Target version set to 0.8

Change committed in r1599 with the last solution you proposed to avoid code duplication.

Also available in: Atom PDF