Remove per-file progress reporting when exporting to Android
Calling `step()` on EditorProgress too often will slow down the
rest of the editor, so it's best avoided. This is also more consistent
with other exporters, as most of them don't report per-file progress
either.
Exporting a 2D project with ~1,100 files to Android now takes
about 10 seconds from a debug editor build instead of 65 seconds.
This closes #30850.
(cherry picked from commit 2dd3a01d11
)
This commit is contained in:
parent
bc61439306
commit
9a8455f5a7
|
@ -642,9 +642,6 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
|
||||||
String dst_path = p_path.replace_first("res://", "assets/");
|
String dst_path = p_path.replace_first("res://", "assets/");
|
||||||
|
|
||||||
store_in_apk(ed, dst_path, p_data, _should_compress_asset(p_path, p_data) ? Z_DEFLATED : 0);
|
store_in_apk(ed, dst_path, p_data, _should_compress_asset(p_path, p_data) ? Z_DEFLATED : 0);
|
||||||
if (ed->ep->step("File: " + p_path, 3 + p_file * 100 / p_total)) {
|
|
||||||
return ERR_SKIP;
|
|
||||||
}
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1497,7 +1494,7 @@ public:
|
||||||
String adb = EditorSettings::get_singleton()->get("export/android/adb");
|
String adb = EditorSettings::get_singleton()->get("export/android/adb");
|
||||||
|
|
||||||
// Export_temp APK.
|
// Export_temp APK.
|
||||||
if (ep.step("Exporting APK", 0)) {
|
if (ep.step("Exporting APK...", 0)) {
|
||||||
device_lock->unlock();
|
device_lock->unlock();
|
||||||
return ERR_SKIP;
|
return ERR_SKIP;
|
||||||
}
|
}
|
||||||
|
@ -1547,7 +1544,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
print_line("Installing to device (please wait...): " + devices[p_device].name);
|
print_line("Installing to device (please wait...): " + devices[p_device].name);
|
||||||
if (ep.step("Installing to device (please wait...)", 2)) {
|
if (ep.step("Installing to device, please wait...", 2)) {
|
||||||
CLEANUP_AND_RETURN(ERR_SKIP);
|
CLEANUP_AND_RETURN(ERR_SKIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1614,7 +1611,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ep.step("Running on Device...", 3)) {
|
if (ep.step("Running on device...", 3)) {
|
||||||
CLEANUP_AND_RETURN(ERR_SKIP);
|
CLEANUP_AND_RETURN(ERR_SKIP);
|
||||||
}
|
}
|
||||||
args.clear();
|
args.clear();
|
||||||
|
@ -2119,7 +2116,7 @@ public:
|
||||||
FileAccess *src_f = NULL;
|
FileAccess *src_f = NULL;
|
||||||
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
|
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
|
||||||
|
|
||||||
if (ep.step("Creating APK", 0)) {
|
if (ep.step("Creating APK...", 0)) {
|
||||||
return ERR_SKIP;
|
return ERR_SKIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2281,7 +2278,7 @@ public:
|
||||||
ret = unzGoToNextFile(pkg);
|
ret = unzGoToNextFile(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ep.step("Adding Files...", 1)) {
|
if (ep.step("Adding files...", 1)) {
|
||||||
CLEANUP_AND_RETURN(ERR_SKIP);
|
CLEANUP_AND_RETURN(ERR_SKIP);
|
||||||
}
|
}
|
||||||
Error err = OK;
|
Error err = OK;
|
||||||
|
|
Loading…
Reference in New Issue