summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-27 13:49:39 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-28 09:59:46 +0100
commit093cdd2188cfc21c7837214099c35fb054a76a9f (patch)
tree9e096bf88954316b871f44c6ee0e724a09acdef3 /editor/editor_file_system.cpp
parentdf78c0636d79c9545a283e0e2a926d623998cc27 (diff)
downloadredot-engine-093cdd2188cfc21c7837214099c35fb054a76a9f.tar.gz
EditorFileSystem: Add verbose print for file being (re)imported
Also print the time it took for each file.
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index fa6a02f9d4..3e11b4a5ff 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -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);
@@ -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;
}