-
Notifications
You must be signed in to change notification settings - Fork 62
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
Lag on large directory #61
Comments
Are you browsing in directories which needs root or normal like internal storage? |
In normal folder. I already found where was the problem. Where you go to getView() method in BrowserListAdapter there is this method : IconPreview.getFileIcon(file, mViewHolder.icon); When you open it you can see this method: loadFromRes(file, icon); and inside it there is a line: String[] files = file.list(); And that was causing lag. When you create array of 17k members it takes quite a while, so I changed it into this:
|
I use file.list() to check if folder has content for setting the correct icon. I will look for a better solution now.. |
I know why you use it. The problem is that it causes lag. Maybe try to put it into another thread. |
Hello, I'm using your code in my own file explorer. And I am encountering issue with large directories. Once a directory has more than 1k subFiles when I scroll to it I got lag for 1 second. My tested directory has 17k subFiles and I lag very hard when scrolling over it. Can you please resolve it ?
The text was updated successfully, but these errors were encountered: