Merge pull request #851 from xiaoyifang/fix/slob-index-slow

fix: slob fullindex will freeze the preference dialog
This commit is contained in:
xiaoyifang 2023-06-11 22:23:54 +08:00 committed by GitHub
commit f67f5aa228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1098,6 +1098,8 @@ void SlobDictionary::sortArticlesOffsetsForFTS( QVector< uint32_t > & offsets, Q
qint32 entries = sf.getRefsCount();
for ( qint32 i = 0; i < entries; i++ ) {
if ( Utils::AtomicInt::loadAcquire( isCancelled ) )
throw exUserAbort();
if ( offsets.contains( sortedOffsets[ i ].second ) )
newOffsets.append( sortedOffsets[ i ].second );
}