LuckSiege / LuckSiege/PictureSelector

进入剪裁页面一直读取

Open
#2,090 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
13.6k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

华为,EMUI 11系统,android版本10,使用PictureSelector demo测试 v2.7.3-rc06

现象:首次进入进程,选择大于3M的图片,确定后进入剪裁页面,非常快就显示了图片,此时不杀进程,重新选择该图片,进入剪裁,大概4秒钟才显示图片,此时再退出重新选择该图片,进入剪裁页面,一直转圈,远远不止4秒钟,最后大概1分钟左右才显示图片;若杀掉进程,重新进入APP,选择图片,进入剪裁页面,很快就显示图片,不杀进程重复上述步骤,又变得非常慢。而小图片几百K的图片没有此现象。上述现象必现。

代码跟踪:定位到执行时间超长的代码为 BitmapLoadTask类 下的 decodeSampledBitmap = BitmapFactory.decodeStream(stream, null, options);

不知道为什么会有这么长时间,其他手机,例如小米MIUI12.5 android11,还是荣耀 Magic UI3.1.0 android10等都大概200ms左右就完成了,没有出现上述问题。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the repeated selection flow on Huawei EMUI 11/Android 10 with PictureSelector v2.7.3-rc06, using an image larger than 3 MB. Start in BitmapLoadTask at BitmapFactory.decodeStream(stream, null, options), comparing the first load with later loads after returning to the crop page. Done means the repeated large-image flow no longer exhibits the reported prolonged loading on the affected setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.