mirror of
https://github.com/gkd-kit/gkd.git
synced 2024-11-16 03:32:38 +08:00
perf: rule index
This commit is contained in:
parent
81ced236da
commit
03bb53999a
|
@ -20,7 +20,7 @@ sealed class ResolvedRule(
|
|||
val rawSubs = g.subscription
|
||||
val config = g.config
|
||||
val key = rule.key
|
||||
val index = group.rules.indexOf(rule)
|
||||
val index = group.rules.indexOfFirst { r -> r === rule }
|
||||
private val preKeys = (rule.preKeys ?: emptyList()).toSet()
|
||||
private val matches = rule.matches?.map { s -> Selector.parse(s) } ?: emptyList()
|
||||
private val excludeMatches = (rule.excludeMatches ?: emptyList()).map { s -> Selector.parse(s) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user