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

EditorFileSystem: Add verbose print for file being (re)imported #88904

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,9 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
}

Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<StringName, Variant> &p_custom_options, const String &p_custom_importer, Variant *p_generator_parameters) {
print_verbose(vformat("EditorFileSystem: Importing file: %s", p_file));
uint64_t start_time = OS::get_singleton()->get_ticks_msec();

EditorFileSystemDirectory *fs = nullptr;
int cpos = -1;
bool found = _find_file(p_file, &fs, cpos);
Expand Down Expand Up @@ -2268,6 +2271,8 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin

EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);

print_verbose(vformat("EditorFileSystem: \"%s\" import took %d ms.", p_file, OS::get_singleton()->get_ticks_msec() - start_time));

return OK;
}

Expand Down
4 changes: 2 additions & 2 deletions modules/astcenc/image_compress_astcenc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void _compress_astc(Image *r_img, Image::ASTCFormat p_format) {

r_img->set_data(width, height, mipmaps, target_format, dest_data);

print_verbose(vformat("astcenc: Encoding took %s ms.", rtos(OS::get_singleton()->get_ticks_msec() - start_time)));
print_verbose(vformat("astcenc: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time));
}

void _decompress_astc(Image *r_img) {
Expand Down Expand Up @@ -286,5 +286,5 @@ void _decompress_astc(Image *r_img) {

r_img->set_data(width, height, mipmaps, target_format, dest_data);

print_verbose(vformat("astcenc: Decompression took %s ms.", rtos(OS::get_singleton()->get_ticks_msec() - start_time)));
print_verbose(vformat("astcenc: Decompression took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time));
}
2 changes: 1 addition & 1 deletion modules/etcpak/image_compress_etcpak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,5 @@ void _compress_etcpak(EtcpakType p_compresstype, Image *r_img) {
// Replace original image with compressed one.
r_img->set_data(width, height, mipmaps, target_format, dest_data);

print_verbose(vformat("etcpak: Encoding took %s ms.", rtos(OS::get_singleton()->get_ticks_msec() - start_time)));
print_verbose(vformat("etcpak: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time));
}
Loading