curran / curran/google-diff-match-patch

Replacing String with StringBuffer instances in patch_apply

オープン
#55 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
auto-migrated Performance Type-Patch
主要言語
Python
スター
17
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

```
We used this DiffMatchPatch code extensively for tracking differences between
versions of database objects. Some of our calls can generate more than 25k
patch strings that need to be applied to large chunks of text. In this instance
we where seeing severe performance issues and inefficient memory management
(even on Java 6).
This patch replaces Strings with StringBuffer and implements more efficient
INSERT & DELETE operations which drastically reduces memory usage for large
text strings.
```

Original issue reported on code.google.com by `chris.p....@gmail.com` on 4 Oct 2011 at 4:37

Attachments:
- [diff_match_patch.java.patch](https://storage.googleapis.com/google-code-attachments/google-diff-match-patch/issue-55/comment-0/diff_match_patch.java.patch)

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

添付された diff_match_patch.java.patch を Java 実装と照合してレビューし、まずエントリーポイント patch_apply を調査してください。提案されている StringBuffer および INSERT/DELETE の変更が、パッチ適用の動作を維持しつつ、issue で説明されている大きな入力におけるメモリとパフォーマンスの問題に対処していることを確認してください。

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

評価

技術スタック
java
領域
performance
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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