Skip to content

Commit

Permalink
Fallback to PlainAssetSoSource in case compression can't be found for…
Browse files Browse the repository at this point in the history
… modules

Summary:
After D53000687, we'll need to support voltron modules with deflated asset libraries, e.g. for debug builds. See test plan for more explanations.

XZ is slow, so we were in fact wasting up to 90 seconds compressing libraries even for debug builds. After the whole stack lands, debug builds should be faster.

Reviewed By: michalgr

Differential Revision: D53108461

fbshipit-source-id: b5bc65de47dbcb05f7eabfcf21f6b374f3428551
  • Loading branch information
adicatana authored and facebook-github-bot committed Jan 26, 2024
1 parent d67b4af commit 93c5682
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions java/com/facebook/soloader/ExtractFromZipSoSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public ExtractFromZipSoSource(
mZipSearchPattern = zipSearchPattern;
}

public ExtractFromZipSoSource(
Context context, File storePath, File zipFileName, String zipSearchPattern) {
super(context, storePath);
mZipFileName = zipFileName;
mZipSearchPattern = zipSearchPattern;
}

@Override
public String getName() {
return "ExtractFromZipSoSource";
Expand Down Expand Up @@ -93,8 +100,9 @@ ZipDso[] computeDsosFromZip() {
if (!m.matches()) {
continue;
}
String libraryAbi = m.group(1);
String soName = m.group(2);
int soNameIdx = m.groupCount();
String libraryAbi = m.group(soNameIdx - 1);
String soName = m.group(soNameIdx);
int abiScore = SysUtil.findAbiScore(supportedAbis, libraryAbi);
if (abiScore < 0) {
continue;
Expand Down

0 comments on commit 93c5682

Please sign in to comment.