mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Various performance tweaks (#474)
* Store and reuse room list placeholder avatars and last messages * Cache and reuse HomeScreenRooms * Reduce RoomSummaryProvider diff collection time * Promote more logs to info * Slighty tweak RustTracing to make it easier to configure * Move TimelineProvider and RoomTimelineController item processing to background queues * Prevent the timeline from stopping an ogoing decelerating scroll when starting backpaginating
This commit is contained in:
@@ -19,32 +19,18 @@ import XCTest
|
||||
@testable import ElementX
|
||||
|
||||
class TracingConfigurationTests: XCTestCase {
|
||||
func testReleaseConfiguration() {
|
||||
let filterComponents = TracingConfiguration.release.filter.components(separatedBy: ",")
|
||||
XCTAssertTrue(filterComponents.contains("info"))
|
||||
XCTAssertTrue(filterComponents.contains("hyper=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("sled=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_sled=warn"))
|
||||
}
|
||||
|
||||
func testDebugConfiguration() {
|
||||
let filterComponents = TracingConfiguration.debug.filter.components(separatedBy: ",")
|
||||
XCTAssertTrue(filterComponents.contains("warn"))
|
||||
XCTAssertTrue(filterComponents.contains("hyper=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("sled=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_sled=warn"))
|
||||
}
|
||||
|
||||
func testFullConfiguration() {
|
||||
let filterComponents = TracingConfiguration.full.filter.components(separatedBy: ",")
|
||||
XCTAssertTrue(filterComponents.contains("info"))
|
||||
XCTAssertTrue(filterComponents.contains("hyper=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("sled=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_sled=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk::http_client=trace"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_ffi::uniffi_api=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_ffi=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk::sliding_sync=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_base::sliding_sync=warn"))
|
||||
func testConfiguration() {
|
||||
let configuration = TracingConfiguration(overrides: [.common: .trace,
|
||||
.matrix_sdk_base_sliding_sync: .error,
|
||||
.matrix_sdk_http_client: .warn,
|
||||
.matrix_sdk_crypto: .info,
|
||||
.hyper: .debug])
|
||||
|
||||
let filterComponents = configuration.filter.components(separatedBy: ",")
|
||||
XCTAssertEqual(filterComponents.first, "trace")
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_base::sliding_sync=error"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk::http_client=warn"))
|
||||
XCTAssertTrue(filterComponents.contains("matrix_sdk_crypto=info"))
|
||||
XCTAssertTrue(filterComponents.contains("hyper=debug"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user