You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Optimize revision control overlay application query
Stacks queries into subqueries that only fire when necessary, drastically reduces time spent per frame. (~40ms on huge levels down to ~2us) #rb brooke.hubert, logan.buchy, ronald.koppers [CL 35157261 by zach rammell in ue5-main branch]
This commit is contained in:
@@ -2021,6 +2021,7 @@ bool FPerforceUpdateStatusWorker::UpdateStates() const
|
||||
auto UpdateDataStorage = [](const FPerforceSourceControlState& State)
|
||||
{
|
||||
using namespace TypedElementQueryBuilder;
|
||||
using namespace TypedElementDataStorage;
|
||||
using DSI = ITypedElementDataStorageInterface;
|
||||
|
||||
UTypedElementRegistry* Registry = UTypedElementRegistry::GetInstance();
|
||||
@@ -2041,7 +2042,7 @@ bool FPerforceUpdateStatusWorker::UpdateStates() const
|
||||
FPaths::NormalizeFilename(Filename);
|
||||
Filename = FPaths::ConvertRelativePathToFull(Filename);
|
||||
|
||||
uint64 Index = TypedElementDataStorage::GenerateIndexHash(Filename);
|
||||
uint64 Index = GenerateIndexHash(Filename);
|
||||
TypedElementRowHandle Row = DataStorage->FindIndexedRow(Index);
|
||||
|
||||
if (!DataStorage->IsRowAvailable(Row))
|
||||
@@ -2121,6 +2122,16 @@ bool FPerforceUpdateStatusWorker::UpdateStates() const
|
||||
{
|
||||
DataStorage->RemoveColumn(Row, Column);
|
||||
}
|
||||
|
||||
if (FTypedElementPackageReference* BackReference = DataStorage->GetColumn<FTypedElementPackageReference>(Row))
|
||||
{
|
||||
if (RowHandle ObjectRow = BackReference->Row; ObjectRow != InvalidRowHandle)
|
||||
{
|
||||
static TableHandle Table = DataStorage->FindTable(FName("Editor_PackageUpdateTable"));
|
||||
RowHandle UpdateRow = DataStorage->AddRow(Table);
|
||||
DataStorage->AddColumn(UpdateRow, FTypedElementPackageUpdateColumn{ .ObjectRow = ObjectRow, .PackageRow = Row });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
bool bUpdated = false;
|
||||
|
||||
Reference in New Issue
Block a user