ThioJoe / YT-Spammer-Purge

Allows you easily scan for and delete scam comments using several methods.
GNU General Public License v3.0
4.57k stars 389 forks source link

speed up check_duplicates and reduce ram usage #1109

Closed virophagesp closed 4 months ago

virophagesp commented 5 months ago

previously indexs were being added to a list and then its only use was to get the length I have changed the code to instead have it be a number

Related Issue/Addition to code

Proposed Changes

Why is this change needed?

It speeds up the checking of duplicate comments ### Additional Info - the only time the list is used other than when being added is having its length checked ### Checklist: - [x] My code follows the style guidelines of this project and I have read [CONTRIBUTING.md](/CONTRIBUTING.md) - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] Any dependent changes have been merged and published in downstream modules - [x] I have checked my code and corrected any misspellings
virophagesp commented 5 months ago

this is ready @ThioJoe

virophagesp commented 5 months ago

I should have mentioned I thought I could add labels in draft mode, I could not

virophagesp commented 4 months ago

this is stale