Skip to content

Commit

Permalink
Improve parallelization of common subdomains / related block entries
Browse files Browse the repository at this point in the history
  • Loading branch information
cstigler committed Oct 4, 2021
1 parent c20d28e commit 7d350da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Block Management/BlockManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,13 @@ - (void)addBlockEntryFromString:(NSString*)entryString {
// nil means that we don't have anything valid to block in this entry
if (entry == nil) return;

[self addBlockEntry: entry];

// enqueue new entries _before_ running this one, so they can happen in parallel
NSArray<SCBlockEntry*>* relatedEntries = [self relatedBlockEntriesForEntry: entry];
for (SCBlockEntry* relatedEntry in relatedEntries) {
[self enqueueBlockEntry: relatedEntry];
}

[self addBlockEntry: entry];
}

- (void)addBlockEntriesFromStrings:(NSArray<NSString*>*)blockList {
Expand Down

0 comments on commit 7d350da

Please sign in to comment.