libgit2 / libgit2/libgit2sharp

Leak when iterating through commits and diff them

オープン
#1,359 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

When I run the code below on a production repository, i can see that the memory is all the time increasing and after about 3000 commits my pc crashes with out of memory.

For about 1000 commit it reserved about 500 MB Ram.

Code for Testsetup see here:
https://gist.github.com/Gentlehag/9f595ab13f459e22859fa5d9557e550b

PS: I also posted here:
http://stackoverflow.com/questions/39258639/possible-leak-when-reading-content

My target is to just iterate through all commits and getting all files that were changed in eahc commit.

Is there a better way ? Is this a bug?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、issue の GitHub Gist にリンクされている再現手順を実行し、コミットと diff を反復処理する間のメモリを観察します。Stack Overflow のディスカッションと動作を比較し、リークがコミットの反復処理にあるのか diff の処理にあるのかを特定します。増加を再現し、検証済みの修正または文書化された代替手段を確立できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, git
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。