Simple-File-Manager/app
Robert Nitsch 60fb26ab0a Speed up directory listing by factor 4-5 by improving getChildren function
The speed up is achieved by multiple changes:
1) Use list() instead of listFiles() function. The former only returns a String array
containing the relative pathnames, and therefore is faster and consumes less
memory.
2) The list() function should only be called once. In the previous implementation,
the function was called twice (for directories). The first time it was only checked
against null and then thrown away.
3) The Strings do not have a "isHidden" property, obviously. However, hidden
files can be easily distinguished by checking if the first character is a dot (".").

Performance tests were done in a directory with 12 sub-directories that have
about 900 children in total. The old implementation needed about 400-500 ms
to list the directory. With the new implementation, only 100ms are needed.
2017-07-08 15:11:56 +02:00
..
src/main Speed up directory listing by factor 4-5 by improving getChildren function 2017-07-08 15:11:56 +02:00
.gitignore initial commit 2016-07-12 22:07:49 +02:00
build.gradle update version to 2.2.2 2017-04-24 19:08:37 +02:00
proguard-rules.pro adding a couple proguard rules 2016-11-12 23:55:23 +01:00