mattermost / desktop

Mattermost Desktop application for Windows, Mac and Linux
Apache License 2.0
2.01k stars 823 forks source link

[Bug]: Text input is lagging #2722

Open indeyets opened 1 year ago

indeyets commented 1 year ago

Before you file a bug report

Mattermost Desktop Version

5.3.1

Operating System

macOS Ventura 13.4 x64

Mattermost Server Version

7.10.0

Steps to reproduce

Try to type a long message fast

Expected behavior

Letters appear instantly

Observed behavior

Letters appear with a noticeable delay.

Similar effect can be seen when webapps try to handle all of the input via heavy event handlers.

Log Output

[2023-05-16 00:15:11.314] [warn]  main window closed
[2023-05-16 08:54:03.825] [debug] DownloadsManager.init {
  'this.json': {
    'image.png': {
      addedAt: 1675363310572,
      filename: 'image.png',
      mimeType: 'image/png',
      location: '/Users/indy/Downloads/image.png',
      progress: 100,
      receivedBytes: 112440,
      state: 'completed',
      totalBytes: 112440,
      type: 'file'
    },
    '2023-03-23_150915.png': {
      addedAt: 1679578439464,
      filename: '2023-03-23_150915.png',
      mimeType: 'image/png',
      location: '/Users/indy/Downloads/2023-03-23_150915.png',
      progress: 100,
      receivedBytes: 2360962,
      state: 'completed',
      totalBytes: 2360962,
      type: 'file'
    },
    'last image.jpg': {
      addedAt: 1683111554953,
      filename: 'last image.jpg',
      mimeType: 'image/jpeg',
      location: '/Users/indy/Downloads/last image.jpg',
      progress: 100,
      receivedBytes: 118317,
      state: 'completed',
      totalBytes: 118317,
      type: 'file'
    }
  },
  validatedJSON: {
    'image.png': {
      addedAt: 1675363310572,
      filename: 'image.png',
      mimeType: 'image/png',
      location: '/Users/indy/Downloads/image.png',
      progress: 100,
      receivedBytes: 112440,
      state: 'completed',
      totalBytes: 112440,
      type: 'file'
    },
    '2023-03-23_150915.png': {
      addedAt: 1679578439464,
      filename: '2023-03-23_150915.png',
      mimeType: 'image/png',
      location: '/Users/indy/Downloads/2023-03-23_150915.png',
      progress: 100,
      receivedBytes: 2360962,
      state: 'completed',
      totalBytes: 2360962,
      type: 'file'
    },
    'last image.jpg': {
      addedAt: 1683111554953,
      filename: 'last image.jpg',
      mimeType: 'image/jpeg',
      location: '/Users/indy/Downloads/last image.jpg',
      progress: 100,
      receivedBytes: 118317,
      state: 'completed',
      totalBytes: 118317,
      type: 'file'
    }
  }
}
[2023-05-16 08:54:03.838] [debug] DownloadsManager.saveAll
[2023-05-16 08:54:03.839] [debug] DownloadsManager.checkForDeletedFiles
[2023-05-16 08:54:03.907] [warn]  Current working directory is /, changing into /Applications/Mattermost.app/Contents/MacOS
[2023-05-16 08:54:04.172] [info]  Autoupgrade disabled: false
[2023-05-16 08:54:04.314] [warn]  couldn't show lit___TAB_MESSAGING, not ready
[2023-05-16 08:54:04.315] [warn]  Failed to set new language en-GB
[2023-05-16 08:54:04.315] [warn]  Failed to set new language RU
[2023-05-16 16:20:40.286] [info]  hide back button
[2023-05-16 16:21:31.893] [info]  hide back button
[2023-05-16 16:21:36.887] [info]  lit___TAB_MESSAGING timeout expired will show the browserview
[2023-05-16 16:33:09.218] [info]  Saving config data to file...
[2023-05-16 16:33:19.944] [info]  Saving config data to file...
[2023-05-16 16:33:19.975] [error] Log level set to: error

Additional Information

Same chats in browser work perfectly fast

devinbinnie commented 1 year ago

@indeyets There might still be an outstanding bug, where if you hover over the textbox while typing, typing is slower. Does moving the mouse cursor help?

If not, can you reproduce the same issue on community.mattermost.com?

indeyets commented 1 year ago

@devinbinnie yes, I can reproduce it on community server too

and, no, I don't feel that mouse hovering does any difference

cadavre commented 1 year ago

I can confirm this behavior. But actually this is happening for a long time now, yet with each another version things are getting slower and slower.

macOS Ventura 13.3.1 Intel with various Mattermost servers and versions

This is definitely something about Mattermost Desktop and very often Mattermost Helper (Renderer) takes 200% CPU. Things are getting worse when I open a file (ie. PDF or PNG) sent via message.

I can confirm using the same servers with browser does work much faster.