mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
af34399135
`regex.containsMatchIn()` for `.*@room.*` can take significantly longer than checking for `@room` (some real-world events I was getting took around 15 seconds with this, significantly slowing down the sync parsing). Checking `containsMatchIn()` does not lead to different results when having leading and trailing stars however, it will match in the same cases as when these are omitted. For testing purposes, I sent myself some Lorem Ipsum with 5000 words (not containing any @room). Without this change, the regex evaluation takes about 16 seconds. With this change, the regex evaluation now takes significantly less then a second.
2 lines
82 B
Plaintext
2 lines
82 B
Plaintext
Big messages taking inappropriately long to evaluate .m.rule.roomnotif push rules
|