Optimize Content Filter Inner Loop #18
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: owner/RSE#18
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This way of filtering is rather inefficient, since the number only grows with each IP inserted to the unfiltered database, so the loop has to go from 0 --> check if that id has been filtered --> continue to next iteration because it has already been filtered, and then start filtereing when it's done looking through the whole unfiltered database.
It would be better if we instead just returned an array of Id's that hasn't been filtered yet, and loop over them.
This should also help lessen the pressure on the GC, since
_dbHandler.ReadUnfilteredWithId(id);
has to be called less. And the less we call it, the fewerSqliteConnection
andSqliteDataReader
objects we have to create. Plus it also gives a little speed-boost to loop through less rows in the database.