Better handle many (MANY) duplicate refs

In large designs with thousands of duplicate elements (e.g. power
symbols), we need to be smart about vector management.  Removing all but
the first few items should be batched and not element at a time

Ref: KSC-885
This commit is contained in:
Seth Hillbrand 2023-08-28 17:03:39 -07:00
parent 040d192690
commit b43f037a91
1 changed files with 1 additions and 2 deletions

View File

@ -634,8 +634,7 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
}
// Remove aAdditionalRefs references
for( size_t i = originalSize; i < ( aAdditionalRefs.GetCount() + originalSize ); i++ )
RemoveItem( originalSize );
m_flatList.erase( m_flatList.begin() + originalSize, m_flatList.end() );
wxASSERT( originalSize == GetCount() ); // Make sure we didn't make a mistake
}