Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix performance issue for regexp in Reporting.kt (#4550)
A regexp object is compiled into an internal data structure during initialization. This could to a potential performance impact, if the `Regex()` constructor is called multiple times for the same pattern. Since the private function `truncatedMessage()` could be called a lot, this PR fixes this potential performance issue. Because of the overhead of object instantiation and regular expression compilation, reusing the initialized object is the recommended way.
- Loading branch information