diff --git a/distribution/changelog.txt b/distribution/changelog.txt index e3050b6be5..00c3f0550a 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,5 +1,6 @@ 0.5.2 (in development) ------------------------------------------------------------------------ +- Improved: [#26566] Improve the performance of sorting sprites. - Fix: [#26583] The default tab is not highlighted when opening a ride window. 0.5.1 (2026-05-17) diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 7463e651bf..5dc932c804 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -23,7 +23,6 @@ #include "../localisation/LocalisationService.h" #include "../localisation/StringIdType.h" #include "../paint/Painter.h" -#include "../platform/Memory.h" #include "../profiling/Profiling.h" #include "Boundbox.h" #include "Paint.Entity.h" @@ -470,10 +469,6 @@ static void PaintStructsSortQuadrantLegacy(PaintStruct* parent, PaintStruct* chi auto* ps = child; child = child->NextQuadrantEntry; - if (child != nullptr) - { - PREFETCH(&child->Bounds); - } if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant) { break; @@ -518,11 +513,6 @@ static void PaintStructsSortQuadrantStable(PaintStruct* parent, PaintStruct* chi { PaintStruct* next = child->NextQuadrantEntry; - if (next != nullptr) - { - PREFETCH(&next->Bounds); - } - // Stop if at the end of the list or outside the quadrant range. if (next == nullptr || next->SortFlags & PaintSortFlags::OutsideQuadrant) {