mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 03:18:55 +02:00
[texture_cache] Skip alias synchronization in texture cache when the image has no aliases. (#3740)
PrepareImage() is on a very hot path and previously called SynchronizeAliases() unconditionally. For most images, aliased_images` is empty, so this created unnecessary overhead, now we only synchronize only when image requires it Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3740 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: wildcard <wildcard@eden-emu.dev> Co-committed-by: wildcard <wildcard@eden-emu.dev>
This commit is contained in:
parent
9ace6742d7
commit
34fa39eae8
1 changed files with 3 additions and 1 deletions
|
|
@ -2733,7 +2733,9 @@ void TextureCache<P>::PrepareImage(ImageId image_id, bool is_modification, bool
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
RefreshContents(image, image_id);
|
RefreshContents(image, image_id);
|
||||||
SynchronizeAliases(image_id);
|
if (!image.aliased_images.empty()) {
|
||||||
|
SynchronizeAliases(image_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (is_modification) {
|
if (is_modification) {
|
||||||
MarkModification(image);
|
MarkModification(image);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue