-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Description
Issue details
In Windows, loading apk files with many resource files takes additional time because of the getCanonicalFile function
| File canonical = new File(currentPath, entryName).getCanonicalFile(); |
Following image shows the time that getCanonicalFile took (7sec)

After replacing it with getAbsoluteFile (which doesn't use IO) it took (1sec)

Total load time was 20 sec. 7 seconds makes huge difference.
getCanonicalFile resolves "..", "." and symlinks. In isValidZipEntryName, getCanonicalFile's return value is used to check if entry will be in sub directory of the CWD. Before this ".." is checked. So if we replace it with "getAbsoluteFile" we will be missing only symlinks. If there are no security implications I can create a PR.
Jadx version
dev
Java version
21.0.5
OS
- Windows
- Linux
- macOS