Skip to content
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

建议图片分页加载 #252

Open
MinDaren opened this issue Dec 9, 2022 · 1 comment
Open

建议图片分页加载 #252

MinDaren opened this issue Dec 9, 2022 · 1 comment

Comments

@MinDaren
Copy link

MinDaren commented Dec 9, 2022

我的手机相册有近万张图,打开相册的时候会很慢,要几分钟,现在一般人手机里几千张照片还是很正常的,所有建议增加分页功能,还是比较重要的

@Merpyzf
Copy link

Merpyzf commented Apr 17, 2023

加载慢的问题并不在分页上,实测从 MediaStore 中查询 3w+ 的图片可以保持在 100ms 以内。上述加载慢的原因是,作者在对查询到的图片执行遍历时引入了 File 相关的操作。

// AlbumModel.java
 File file = new File(path);
                if (!file.exists()) {
                    continue;
                }

上述判断在展示时再进行处理或许更合理一些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants