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

Make APK expansion initialization faster. Make exists() faster for files #3471

Merged
merged 1 commit into from Oct 8, 2015

Conversation

@sarkanyi
Copy link
Contributor

sarkanyi commented Oct 8, 2015

It seems that if there are lots of entries in the obb file, exists() is rather slow because it has to search a large HashMap. This should make it much faster.

@sarkanyi sarkanyi force-pushed the sarkanyi:master branch Oct 8, 2015
FileHandle zipHandle = new AndroidZipFileHandle(path);
if (zipHandle.exists())
handle = zipHandle;
handle = new AndroidZipFileHandle(path);

This comment has been minimized.

Copy link
@MobiDevelop

MobiDevelop Oct 8, 2015

Member

Shouldn't this only fallback to the expansion file if the type is Internal?

This comment has been minimized.

Copy link
@sarkanyi

sarkanyi Oct 8, 2015

Author Contributor

I think you're right. While I'm still at this, let's fix this too.

@sarkanyi sarkanyi force-pushed the sarkanyi:master branch 3 times, most recently Oct 8, 2015
Fall back to APK expansion only in case of internal files
Simplify getAssetFileDescriptor()
@sarkanyi sarkanyi force-pushed the sarkanyi:master branch to 881d694 Oct 8, 2015
MobiDevelop added a commit that referenced this pull request Oct 8, 2015
Make APK expansion initialization faster. Make exists() faster for files
@MobiDevelop MobiDevelop merged commit 49ce02b into libgdx:master Oct 8, 2015
1 check passed
1 check passed
PR Check No test results found.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.