mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
change way to compute local echo
This commit is contained in:
@@ -21,7 +21,7 @@ import org.matrix.android.sdk.api.util.profiling.BaseProfiler
|
||||
object SendPerformanceProfiler: BaseProfiler<SendPerformanceProfiler.Stages>() {
|
||||
|
||||
enum class Stages() {
|
||||
LOCAL_ECHO,
|
||||
// LOCAL_ECHO,
|
||||
ENCRYPT_WORKER,
|
||||
ENCRYPT_GET_USERS,
|
||||
ENCRYPT_SET_ROOM_ENCRYPTION,
|
||||
|
@@ -63,7 +63,7 @@ internal class LocalEchoRepository @Inject constructor(@SessionDatabase private
|
||||
if (event.eventId == null) {
|
||||
throw IllegalStateException("You should have set an eventId for your event")
|
||||
}
|
||||
SendPerformanceProfiler.startStage(event.eventId, SendPerformanceProfiler.Stages.LOCAL_ECHO)
|
||||
// SendPerformanceProfiler.startStage(event.eventId, SendPerformanceProfiler.Stages.LOCAL_ECHO)
|
||||
val timelineEventEntity = realmSessionProvider.withRealm { realm ->
|
||||
val eventEntity = event.toEntity(roomId, SendState.UNSENT, System.currentTimeMillis())
|
||||
val roomMemberHelper = RoomMemberHelper(realm, roomId)
|
||||
@@ -88,7 +88,7 @@ internal class LocalEchoRepository @Inject constructor(@SessionDatabase private
|
||||
val roomEntity = RoomEntity.where(realm, roomId = roomId).findFirst() ?: return@asyncTransaction
|
||||
roomEntity.sendingTimelineEvents.add(0, timelineEventEntity)
|
||||
roomSummaryUpdater.updateSendingInformation(realm, roomId)
|
||||
SendPerformanceProfiler.stopStage(event.eventId, SendPerformanceProfiler.Stages.LOCAL_ECHO)
|
||||
//SendPerformanceProfiler.stopStage(event.eventId, SendPerformanceProfiler.Stages.LOCAL_ECHO)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user