Deprecated default FName operator < and >

We've had several cases where the previously default alphabetical sorting caused performance issues when it wasn't needed. We now require you to explicitly choose either slow alphabetical sorting or fast non-alphabetical order.

The fast order does not decode, access or compare actual string data, but the order is not stable between process runs.

#rb steve.robb

[CL 5915265 by Johan Torp in Dev-Core branch]
This commit is contained in:
Johan Torp
2019-04-16 07:16:12 -04:00
parent 9e7ff8f850
commit b6207ed8ee
75 changed files with 217 additions and 185 deletions
@@ -1051,7 +1051,7 @@ void SEventGraph::FillThreadFilterOptions()
// Sort the thread names alphabetically
ThreadNamesForCombo.Sort([]( const TSharedPtr<FName> Lhs, const TSharedPtr<FName> Rhs )
{
return Lhs->IsNone() || ( !Rhs->IsNone() && *Lhs < *Rhs );
return Lhs->IsNone() || ( !Rhs->IsNone() && Lhs->LexicalLess(*Rhs) );
});
// Refresh the combo box
@@ -241,7 +241,7 @@ struct FGroupAndStatSorting
{
FORCEINLINE_DEBUGGABLE bool operator()( const FGroupOrStatNodePtr& A, const FGroupOrStatNodePtr& B ) const
{
return A->GetName() < B->GetName();
return A->GetName().LexicalLess(B->GetName());
}
};
@@ -250,7 +250,7 @@ struct FGroupAndStatSorting
{
FORCEINLINE_DEBUGGABLE bool operator()( const FGroupOrStatNodePtr& A, const FGroupOrStatNodePtr& B ) const
{
return A->GetGroupName() < B->GetGroupName();
return A->GetGroupName().LexicalLess(B->GetGroupName());
}
};
@@ -265,7 +265,7 @@ struct FGroupAndStatSorting
if( TypeA == TypeB )
{
// Sort by stat name.
return A->GetName() < B->GetName();
return A->GetName().LexicalLess(B->GetName());
}
else
{