1
0
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:
Valere
2020-10-08 14:37:12 +02:00
parent c909fc50a2
commit 192b0ed3fb
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -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)
}
}