SchildiChat-android/matrix-sdk-android/src
SpiritCroc bd507a5bd2 Speed up event match regex evaluation for big messages
`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.

Change-Id: If3b13304668ad961abb81d5442f37a3a3a1d48b7
2022-01-20 12:20:47 +01:00
..
androidTest Tests: fix internal TestMatrix 2021-12-03 12:55:32 +01:00
debug/java/org/matrix/android/sdk/internal/network/interceptors Big annoying commit: execute command `./gradlew ktlintFormat` - Fix "colon-spacing" 2021-10-01 13:31:15 +02:00
main Speed up event match regex evaluation for big messages 2022-01-20 12:20:47 +01:00
release/java/org/matrix/android/sdk/internal/network/interceptors Big annoying commit: execute command `./gradlew ktlintFormat` - Fix "colon-spacing" 2021-10-01 13:31:15 +02:00
sharedTest/java/org/matrix/android/sdk/test/shared
test/java/org/matrix/android/sdk using correct license for matrix-sdk test 2021-10-27 16:42:35 +01:00