Changes between Version 8 and Version 10 of Ticket #4127


Ignore:
Timestamp:
03/16/2017 06:35:44 AM (3 years ago)
Author:
trev
Comment:

I've had a look at our use of the Filter.subscriptions reverse mapping. We really need the subscriptions for a filter in the list of blockable items ("source" column and tooltip entry), issue reporter and filter preferences (selecting the right subscription when opening to edit a particular filter). With the exception of the "source" column which can be considered an optional feature, all these use cases aren't performance critical and can take the slow route by searching all subscriptions.

Elsewhere this list is used to determine whether a filter is currently part of an active subscription, most importantly in FilterListener. This use case can be covered by a numerical Filter.subscriptionCount property counting the number of references to this filter from subscriptions (a subscription could contribute to it multiple times if the filter is duplicated in the list).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4127

    • Property Status changed from new to reviewing
  • Ticket #4127 – Description

    v8 v10  
    1313* `Subscription.fromObject()` in unimplemented (to become an internal method once `FilterStorage` has been converted).  
    1414* `Subscription.knownSubscriptions` lookup table replaced by static `Subscription.getKnownSubscription()` method. 
    15  
    16 A replacement for `Filter.subscriptions` should be implemented as well, as `Filter.subscriptionCount` property and `Filter.subscriptionAt()` method. 
     15* A replacement for `Filter.subscriptions` reverse mapping should **not** be implemented. Instead, a `Subscription.indexOfFilter()` method should be implemented - returning -1 for "no such filter." Later, a `Filter.subscriptionCount` property will be implemented to indicate the number of active subscriptions the filter is part of (not part of this issue).