Parsing slows down with each subsequent parse
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- performance
調査の方向性
エントリーポイント apertium.Analyzer('eng') とその analyze 呼び出しから始め、次に hfst ベースのパスと比較しながら issue のループを再現します。反復 1000 回目までに、繰り返しの解析が約 0.0009 秒から 0.03 秒へ増加する理由を追跡します。繰り返しの解析が段階的に遅くならなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Python 3.8.10
apertium-python 0.2.3
apertium 3.8.1
Ubuntu 20.04 (running under WSL)
Reproducing code:
import apertium
import time
i = 0
parser = apertium.Analyzer('eng')
while True:
then = time.time()
parser.analyze("Why does this keep getting slower?")
now = time.time()
print("Parsing {} took {}".format(i, now - then))
i += 1
When I run this code, the time taken for the same parse gradually increases. In the first few iterations it takes about 0.0009 seconds per parse, but by iteration 1000 it takes about 0.03 seconds, and it increases from there. Moving parser = apertium.Analyzer('eng') within the loop doesn't solve the problem. If I use the hfst library to run the transducer instead, no slowdown is observed.
- 主要言語
- Python
- スター
- 35
- フォーク
- 27
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apertium/apertium-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
apertium/apertium-python#109 · コメント 2 件 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
apertium/apertium-python#108 · コメント 10 件 · リアクション 1 件 ·
-
segfaultオープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
apertium/apertium-python#106 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
apertium/apertium-python#105 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
apertium/apertium-python#99 · コメント 3 件 ·
apertium/apertium-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
solana-foundation/pay-kit#341 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nasa/python_cmr#123 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
EleutherAI/lm-evaluation-harness#4243 ·
メンテナーはふだん 1 日以内に返信
-
area: dashboard bug perceived difficulty: 3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Nitjsefnie-Harness-Commons/daedalus#1179 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cusp-ai-oss/tojax#17 ·