- have the system only send 10 events a second, instead of 1000
- don't scan the same package+class name more than once a second
- put each event view scanner on its own thread keyed by package+class
- don't scan if there is already an existing thread for the package+class
this can still cause high cpu usage on views with lots of text
especially if the user continually interacts with it
but is overall much better
to recap:
- a given package+class can only be scanned at most once a second
- a given package+class can only have one scanner at a time
- text to scan will not be scanned if already scanned
- domains to scan will not be scanned if already scanned
Signed-off-by: Tavi <tavi@divested.dev>