diff --git a/cabal.project b/cabal.project index ede8f8be2b..dfe537bb12 100644 --- a/cabal.project +++ b/cabal.project @@ -12,7 +12,7 @@ constraints: zip +disable-bzip2 +disable-zstd source-repository-package type: git location: https://github.com/simplex-chat/simplexmq.git - tag: 246a0d10c22ebe02af2eb34773b77cce10247459 + tag: 21a9051e8bf3a0bb98cdb78b6b7653101051b5ef source-repository-package type: git diff --git a/package.yaml b/package.yaml index 881e9d038f..32b61b6074 100644 --- a/package.yaml +++ b/package.yaml @@ -86,6 +86,7 @@ executables: - websockets == 0.12.* ghc-options: - -threaded + - -rtsopts simplex-bot: source-dirs: apps/simplex-bot diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 916cceb589..8904c4491a 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -423,7 +423,7 @@ executable simplex-chat Paths_simplex_chat hs-source-dirs: apps/simplex-chat - ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded + ghc-options: -Wall -Wcompat -Werror=incomplete-patterns -Wredundant-constraints -Wincomplete-record-updates -Wincomplete-uni-patterns -Wunused-type-patterns -threaded -rtsopts build-depends: aeson ==2.2.* , ansi-terminal >=0.10 && <0.12 diff --git a/src/Simplex/Chat.hs b/src/Simplex/Chat.hs index 2f6eb0c910..0250f59323 100644 --- a/src/Simplex/Chat.hs +++ b/src/Simplex/Chat.hs @@ -359,7 +359,7 @@ startChatController mainApp = do setExpireCIFlag user True subscribeUsers :: forall m. ChatMonad' m => Bool -> [User] -> m () -subscribeUsers onlyNeeded users = do +subscribeUsers onlyNeeded users = traceSection "subscribeUsers" $ do let (us, us') = partition activeUser users vr <- chatVersionRange subscribe vr us @@ -4128,7 +4128,7 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage = XOk -> allowAgentConnectionAsync user conn' confId XOk -- [async agent commands] no continuation needed, but command should be asynchronous for stability _ -> pure () CON -> startReceivingFile user fileId - MSG meta _ msgBody -> do + MSG meta _ msgBody -> traceSection "MSG-FileChunk" $ do parseFileChunk msgBody >>= receiveFileChunk ft (Just conn) meta OK -> -- [async agent commands] continuation on receiving OK @@ -4280,7 +4280,7 @@ processAgentMessageConn vr user@User {userId} corrId agentConnId agentMessage = -- 1) retry processing several times -- 2) stabilize database -- 3) show screen of death to the user asking to restart - tryChatError action >>= \case + traceSlow "withAckMessage" 30 (tryChatError action) >>= \case Right withRcpt -> ackMsg cId cmdId msgMeta $ if withRcpt then Just "" else Nothing Left e -> ackMsg cId cmdId msgMeta Nothing >> throwError e