ankidroid / ankidroid/Anki-Android

[PERF] Import - Avoid copying local files to cache

オープン
#6,036 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
Import Keep Open Performance
主要言語
Kotlin
スター
11.8k
フォーク
2.9k
平均マージ
2日 3時間
マージ済み PR(30日)
167

説明

Came across this when looking into cache usage for the visual editor. I had 700MB in my cache (my phone seems buggy and shows this as "data" usage rather than "cache" on the app screen).

It was removed when I cleared the cache.

File was in `/data/data/com.ichi2.anki/cache`

This an easy win in terms of import performance and removing "out of space" errors. It'll also reduce the likelihood of #5880 as we won't leave remnant files in the cache.

###### Reproduction Steps

1. Import
2. Select File from Internal Storage

###### Expected Result

3. File is not copied to cache when local

###### Actual Result

3. File is copied to cache

###### Debug info
AnkiDroid Version = 2.10alpha70

Android Version = 9

ACRA UUID = d84098a2-8ccd-4e01-b2cf-51d99e7b02c5

###### Research
- [x] I have read the [support page](https://ankidroid.org/docs/help.html) and am reporting a bug or enhancement request specific to AnkiDroid
- [x] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [x] I have searched for similar existing issues here and on the user forum

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

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

評価

この issue はまだ評価されていません。

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

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