-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
画像ディレクトリのスキャン回数が多いためビルドが遅い #1916
Comments
ご報告ありがとうございます。確かにここが重いのかもですね…。 |
なるほど〜、詳細調査ありがとうございます! |
画像ディレクトリスキャンが1回になったので速くなりました。
Ver3.2.0の時より、高速になりました。
対応ありがとうございました。 |
解決とのことでcloseします〜 @takahashim ありがとうございました! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EPUBビルダの処理時間が多くなった原因は?
Issue #1915でEPUBビルダがおそいのは、WSL2の/mnt/でWindowsファイルをアクセスしているのが原因だと思っていました。
しかし、WSL2で
ls-l
などでファイル操作してもそんなに処理時間がかかっていません。IndexBuilderで約40秒もの間に何をしているのだろうと原因を追跡してみました。
ディレクトリスキャンが多い
ImageFinderのdir_entriesは、画像ディレクトリをスキャンしてリストを作成しています。
1回実行すればよいのですが、96回も実行していました。
Linuxでは軽い処理なのですが、WSL2の/mntでWindowsファイルをアクセスすると重い処理です。
この処理を96回も実行しているのがEPUBビルダを遅くしている原因です。
バックトレース
Rubyのcallerでバックトレースを取得しました。
解析結果
ImageFinderのinitializeを96回(12章×2回×4回)呼び出しています。
Rubyは素人なので間違っているかもしれませんが、明らかに重たい(ディスクアクセス)処理を必要以上に呼び出しています。
ぜひ、改善をよろしくお願いいたします。
The text was updated successfully, but these errors were encountered: