Cache notification URL matcher
We introduced notifications that can be triggered when matching a given set of filters for the anti-adblock notification. In the current implementation we are instantiating the matcher each time when we check for a notification based on the assumption that the performance impact would be insignificant.
However, since this is not the case due to this happening on each request we should only instantiate it once and reuse it after that.
What to change
- Instantiate the matcher on notification creation and attach it to the notification as a property _matcher
- Notifications should remain serializable (replace JSON.serialize() to drop all properties starting with "_" if necessary)
- Remove the instantiation in getNextToShow() and instead use the matcher associated with the notification