Disable the cross-process lock in the SDK (#6231)
* Disable the cross-process lock in the SDK We don't use multiple process as iOS does, so we don't need it. It should improve DB performance a bit and overall waste less resources.
This commit is contained in:
parent
b8ce06d80f
commit
496595f20d
2 changed files with 5 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.rustcomponents.sdk.Client
|
||||
import org.matrix.rustcomponents.sdk.ClientBuilder
|
||||
import org.matrix.rustcomponents.sdk.CrossProcessLockConfig
|
||||
import org.matrix.rustcomponents.sdk.RequestConfig
|
||||
import org.matrix.rustcomponents.sdk.Session
|
||||
import org.matrix.rustcomponents.sdk.SlidingSyncVersion
|
||||
|
|
@ -173,6 +174,8 @@ class RustMatrixClientFactory(
|
|||
maxRetryTime = null,
|
||||
)
|
||||
)
|
||||
// Make sure all built clients use the single process cross-process lock config
|
||||
.crossProcessLockConfig(CrossProcessLockConfig.SingleProcess)
|
||||
.run {
|
||||
// Apply sliding sync version settings
|
||||
when (slidingSyncType) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue