Opened 5 years ago

Last modified 2 weeks ago

#1162 reviewing change

Cache notification URL matcher

Reported by: greiner Assignee: greiner
Priority: P2 Milestone:
Module: Core Keywords:
Cc: Blocked By: #7432
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5330039625220096/

Description (last modified by greiner)

Background

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

In lib/notification.js:

  • 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

Hints for testers

  • Check that there are no errors after installing the extension
  • Check that anti-adblock notification shows up on domains listed in the filter list and doesn't show up for any other domains

Change History (9)

comment:1 Changed 5 years ago by greiner

  • Cc trev added

comment:2 Changed 5 years ago by greiner

  • Owner set to greiner

comment:3 Changed 5 years ago by greiner

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:4 Changed 17 months ago by fhd

  • Cc trev removed

comment:5 Changed 16 months ago by greiner

  • Description modified (diff)
  • Tester set to Unknown

Added hints for testers section.

comment:6 Changed 8 weeks ago by umairaslam

Last edited 6 weeks ago by greiner (previous) (diff)

comment:7 Changed 7 weeks ago by greiner

  • Blocked By 7432 added

comment:8 Changed 6 weeks ago by Antoniacummins

Last edited 6 weeks ago by greiner (previous) (diff)

comment:9 Changed 2 weeks ago by mitchellsroka01

[Writing4u.ae]http://www.writing4u.ae/ knows the importance of our work to you. We INK Your FUTURE. We create compelling content for websites, ensuring their success. We craft impactful Resume Writing in Dubai and cover letters that ensure you a job in UAE. We complete every academic project and dissertation in a way that ensures you get a degree with flying colors.

Note: See TracTickets for help on using tickets.