Opened 2 years ago

Last modified 21 months ago

#6735 closed change

Store domains in lower case — at Version 1

Reported by: mjethani Assignee: mjethani
Priority: P2 Milestone:
Module: Core Keywords:
Cc: sergz, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):



Domain names are typically represented in lower case, both in filter lists and as reported by the browser. But the filter classes store the domain names in upper case. The conversion from lower case to upper case creates an additional string that would not otherwise be necessary.

According to my tests, if the filter classes store domain names in lower case instead, it saves ~2 MB on the JS heap with the default subscriptions.

What to change

In the RegExpFilter.fromText implementation, convert the value of the domain option to lower case rather than upper case. Update the names of related properties and the documentation accordingly.

Change History (1)

comment:1 Changed 2 years ago by mjethani

  • Review URL(s) modified (diff)
Note: See TracTickets for help on using tickets.