robert7 / nixnote2

Nixnote - Evernote desktop client for Linux
GNU General Public License v3.0
298 stars 32 forks source link

Windows: quick freezes (2-3 sec) each ~15secs #220

Open charlescanato opened 12 months ago

charlescanato commented 12 months ago

As I said in another issue (#217 ), now I'm able to build v2.1.9 and also the latest master (v2.1.10) on Win7-64 (but I'm building 32-bit), using Qt v5.5 and MingW v4.92. Works beautifully, just the way I'm used to, except for one weird behavior:

Expected vs. actual behavior

After I start it, be it a debug or release version, then around each 13-15 secs, I notice a freeze of 2-3 secs. But it's not a freeze in NixNote2 itself, or in any other app.

So far, other applications where I have a problem are MS Teams (on browser) and Zoom (on browser and app) during calls. Although it seems like small freezes, they are enough for me to close NixNote2, otherwise conversations start to get impossible. I also noticed very recently that Remmina is also impacted by this, when I'm on my Kubuntu machine accessing my Win7 machine.

Of course, actual behavior would be not to feel these problems.

Worse yet, this doesn't seem to affect Linux (platform-specific bugs are a dev's devil). I don't use it that much, but so far I haven't noticed the same problem.

Steps to reproduce the problem

  1. On Win7, just start NixNote2
  2. Start one of the applications I've mentioned and start a conversation. Or, from any other Linux machine, open a remote session with Remmina to the Win7 machine.
  3. Wait for around 15 secs and you'll notice small and frequent freezes in the session or conversation

I didn't add a log because, during the freezes, nothing is dumped to the log.

Other details

charlescanato commented 12 months ago

So, within my limitations, I've been trying to find the code which is triggering this behavior.

After lots of early returns, disabled connects, and stuff like that, I've isolated this tabBar->addTab as the one that starts the behavior.

I'm mostly mapping what I'm investigating, and my possible next steps here, but it'd be great if any of you folks could provide me suggestions, any kind of help, based on the experience you already have with this code.

I took a quick look at Qt's source code, but as it's online, I still need to be sure it's the correct version (5.5). Nothing wrong with the code, of course - I just feel that compiling my own Qt might be the last try I'd do - if I do it.

My planned next steps seem logical to me, but not exactly quick - suggestions are very welcome:

Next:

boo-yee commented 11 months ago

How is it going? If it has not been solved yet, I have two other paths you could consider:

  1. graphic driver(if your PC does not have an independent graphic card, please ignore this) You could disable the graphic card for temprorary to see if the freeze is still there, or have a test in in a virtual machine, or in another PC.
  2. disk I/O You could monitor the disk I/O by Windows Resource Monitor to see if there are conficts between Nixnote and these two apps on the same file.
charlescanato commented 3 months ago

Just an update from a long time ago. But back to the issue.

In the next hours I'll try both of your extra suggestions.

boo-yee commented 3 months ago

So you tried the steps you listed above and failed, right? Apart from the two advices I posted above, I think you could check two options, that is, auto save and auto sync, which are located in Preferences - Advanced - Auto-Save Interval and Preferences - Advanced - Auto-Save Interval. You could disable the auto sync temporarily, and see if the auto save interval value is around 15 seconds.