Give warning if the size in header mismatch the actual file size. If
data chunk size is greater than the actual data size, try to import by
treating all the remaining data as data chunk and give warning to users.
(cherry picked from commit cd126a041e)
Fixes#99592
The following variables were set too early, and later code never ran..
prev_shader, prev_variant, prev_spec_constants variables
These variables were shared in two different branch conditions but were
updated inside the first one, so the second could never be true..
The condition to update lighting also should check prev_spec_constants
since it updates that uniform.
(cherry picked from commit 45a7bcc477)
In addition, fix region_filter_clip_enabled documentation to be consistent with AtlasTexture.xml, since that is the option whose behavior was fixed
(cherry picked from commit d720eb80e1)
A bug was introduced from 057367bf by adding FSR 2.2.1 support.
Which increases hash collision and hurts performance.
(cherry picked from commit 864d4fb32a)
We now cache the Node*<>TreeItem* mapping in the SceneTreeEditor. This
allows us to make targeted updates to the Tree used to display the scene
tree in the editor.
Previously on almost all changes to the scene tree the editor would
rebuild the entire widget, causing a large number of deallocations an
allocations. We now carefully manipulate the Tree widget in-situ saving
a large number of these allocations.
In order to know what Nodes need to be updated we add a
editor_state_changed signal to Node, this is a TOOLS_ENABLED,
editor-only signal fired when changes to Node happen that are relevant
to editor state.
We also now make sure that when nodes are moved/renamed we don't check
expensive properties that cannot contain NodePaths. This saves a lot of
time when SceneTreeDock renames a node in a scene with a lot of
MeshInstances. This makes renaming nodes go from ~27 seconds to ~2
seconds on large scenes.
SceneTreeEditor instances will now also not do all of the potentially
expensive update work if they are invisible. This behavior is turned off
by default so it won't affect existing users. This change allows the
editor to only update SceneTreeEditors that actually in view. In
practice this means that for most changes instead of updating 6
SceneTreeEditors we only update 1 instantly, and the others only when
they become visible.
There is definitely more that could be done, but this is already a
massive improvement. In complex scenes we see an improvement of 10x,
things that used to take ~30 seconds now only take 2.
This fixes#83460
I want to thank KoBeWi, TokisanGames, a-johnston, aniel080400 for
their tireless testing. And AeioMuch for their testing and providing a
fix for the hover issue.
(cherry picked from commit 6f7525c396)
By making sure that Thread always has a valid caller_id we can remove the
check making the function a straightforward getter instead.
In some quick tests we see a repeatable performance improvement of
somewhere around 0.32 mspf in TPS demo.
Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
(cherry picked from commit 873eb21ce8)
When profiling Dome Keeper, I found that in physics_process a HashMap
gets cleared a lot, which ends up calling the Variant destructor.
Calling Variant::clear() dominates this operation.
By not uselessly setting the Type to NIL on destruction we save about
50% of time. This is likely because if there is a simple type in the
Variant that doesn't need destructing, but now we write when we should
just drop the Variant altogether.
Since the value of Variant::type should be unobservable after
destruction this doesn't change any outward behavior.
(cherry picked from commit 46c23e1758)
It seems that we are only enabling this option together with unsafe
build determinators. However it seems that MD5-timestamp by itself is
not unsafe.
MD5-Timestamp works by first checking the timestamp of a file, comparing
it to the scons database and if it does not match it will do an md5sum
to determine if the file needs rebuilding.
Without this option SCons will always create md5sums of every file. In
the case of a null build this is 50% of the time.
(cherry picked from commit 04fff3fe0d)
This restriction was added to fix#7373 back then, which was a symbol conflict
between FreeType's bundled copy of gzip/zlib, and distro packages.
But we also unbundled FreeType's zlib in #69395 so this is no longer an issue.
On the other hand recent issues pointed out that using system-provided icu4c
or harfbuzz can cause issues (#91401, #100301). We still allow it for now but
raise a warning.
(cherry picked from commit 7fe0609118)