Skip to content

Commit

Permalink
Implemented recommended efficiency enhancement
Browse files Browse the repository at this point in the history
Deferred reading the file till after determining if it was
the file to be filtered, so that the file wasn't read twice
per the review comments.
  • Loading branch information
markeel committed Nov 20, 2024
1 parent 89bbc0b commit 9c1d5e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion editor/export/editor_export_platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1495,12 +1495,14 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &

Vector<String> forced_export = get_forced_export_files();
for (int i = 0; i < forced_export.size(); i++) {
Vector<uint8_t> array = FileAccess::get_file_as_bytes(forced_export[i]);
Vector<uint8_t> array;
if (GDExtension::get_extension_list_config_file() == forced_export[i]) {
array = _filter_extension_list_config_file(forced_export[i], paths);
if (array.size() == 0) {
continue;
}
} else {
array = FileAccess::get_file_as_bytes(forced_export[i]);
}
err = p_save_func(p_udata, forced_export[i], array, idx, total, enc_in_filters, enc_ex_filters, key, seed);
if (err != OK) {
Expand Down

0 comments on commit 9c1d5e7

Please sign in to comment.