perf: optimize `setRule` (#7405)
perf: optimize `setRule` (#7405)

- .map and .join on a lot of elements can be quite slow, by adding a bit more lines and using the `forEach` the code will be a lot more performant.
- Partially resolvess #6799

alexanderby/darkreader,alexanderby/darkreader,darkreader/darkreader,darkreader/darkreader,darkreader/darkreader,alexanderby/darkreader