Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Freezes and "Not responding" when reloading script engine on Windows #3024

Open
o-l-a-v opened this issue May 8, 2024 · 15 comments
Open

Comments

@o-l-a-v
Copy link

o-l-a-v commented May 8, 2024

  • QOwnNotes v24.5.1 in portable mode.
  • Windows 11 23H2, 22631.3447

Expected behaviour

Reloading script engine with one simple script that only set some colors should be almost instant.

Script in question, but I don't think the script in itself matters:

Click to view
import QtQml 2.0
QtObject {
  function init() {
    script.addStyleSheet(
      "QWidget {
        /*background-color: #191A21;*/
        selection-background-color: #44475A;
        selection-color: #F8F8F2;
      }"
    );
    script.addStyleSheet(
      "QListView:focus {
        color: #F8F8F2
      }"
    );
    script.addStyleSheet(
      "QWidget:item:selected {
        background-color: #44475A;
        color: #F8F8F2;
      }"
    );
    script.addStyleSheet(
      "QLineEdit, QLineEdit:active {
        background-color: #282A36;
        color: #F8F8F2;
      }"
    );
    script.addStyleSheet(
      "QMarkdownTextEdit {
        background: #282A36;
      }"
    )
    script.addStyleSheet(
      "QListView, QTableView, QTreeView {
        background: #282A36;
      }"
    );
    script.addStyleSheet(
      "QListView::item:pressed, QTableView::item:pressed, QTreeView::item:pressed {
        background: #44475A;
        color: #F8F8F2;
      }"
    );
    script.addStyleSheet(
      "QListView::item:selected:active, QTableView::item:selected:active, QTreeView::item:selected:active {
        background: #44475A;
        color: #F8F8F2;
      }"
    );
    script.addStyleSheet(
      "QListView::item:selected:hover, QTableView::item:selected:hover, QTreeView::item:selected:hover {
        background: #44475A;
        color: #F8F8F2;
      }"
    );
  }
}

Actual behaviour

QOwnNotes freezes for many seconds and becomes "Not responding".

Steps to reproduce

  • Download fresh QOwnNotes ZIP from GH releases
  • Start in portable mode to not inherit previous settings and data qownnotes --portable
  • Go to script settings, add local script by path. QOwnNotes freezes for maybe 20 seconds.
  • Once script is loaded and settings are saved, doing:
    • Scripting -> Reload script engine takes about 5 seconds
    • Scripting -> Script settings (takes about 3 seconds to open) -> Reload script engine takes about 60 seconds.

Output from the debug section in the settings dialog

Almost no changes from a newly downloaded QOwnNotes, running with --portable.

Relevant log output in the Log panel

I enabled all log categories. Here are the output of doing it from Scripting -> Reload script engine.

Expand
[09:02:46] [scripting] loading script file: C:/Users/olav.birkeland/Desktop/QOwnNotes/Data/scripts/QOwnNotes-Script-Theme_text_highlighting.qml
[09:02:50] [status] The scripting engine was reloaded

Microsoft Process Monitor

As QOwnNotes didn't produce much info on what's happening here I looked for other ways to get info. I fired up Microsoft Process Monitor / procmon ( https://learn.microsoft.com/en-us/sysinternals/downloads/procmon ). When reloading script engine procmon fills up with this (tens of thousands of lines):

image

And some registry access in between once in a while:

image
@o-l-a-v
Copy link
Author

o-l-a-v commented May 8, 2024

This happens when simply opening "Settings" too. It takes about 5 seconds. The only log output is the following:

[09:11:56] [debug] cloudConnection: CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <accountId>"" <priority>1

procmon spams the same lines as the first screenshot shows.


If theres anything else I can do to provide debug info; tell me and I'll try to provide it. 😊

@pbek
Copy link
Owner

pbek commented May 8, 2024

You didn't share your settings, hard to get a closer look...
Can you please post the output from the Debug settings in the settings dialog?

So you ran QOwnNotes from a folder QOwnNotes on your desktop? What's that file (or folder) it wants to create? @2x looks like an image upscaling CSS attribute... How does your notes look?
Does the same happen with only the welcome notes and another script from the script repository?

@o-l-a-v
Copy link
Author

o-l-a-v commented May 8, 2024

As described in the original issue: This is a clean ZIP from GitHub releases, only change I made was to add that local script and set theme to Dracula. That's it.

Notes are just the standard ones supplied by QOwnNotes when creating a new note folder.

Heres the output of debug.

Click to expand

QOwnNotes Debug Information

General Info

Current Date: Wed May 8 15:19:50 2024
Version: 24.5.1
Build date: May 5 2024
Build number: 1097
Platform: windows (windows)
Operating System: Windows 10 Version 2009
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: yes
Settings path / key: C:/Users/olav.birkeland/Desktop/QOwnNotes/Data/PBE/QOwnNotes.ini
Application database path: C:\Users\olav.birkeland\Desktop\QOwnNotes\Data\QOwnNotes.sqlite
Application arguments: QOwnNotes.exe, --portable
Qt Debug: 0
Locale (system): en_SE
Locale (interface): empty
Primary screen resolution: 1280x720
Screen resolution(s): 1280x720, 1280x800, 1280x720
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 2
Calendar items: 0
Enabled scripts: 1
Database drivers: QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Spellchecking

Enabled: false
Selected language: empty
Language codes: empty
Language names: empty
Application dictionaries path: C:\Users\olav.birkeland\Desktop\QOwnNotes\Data\dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: 0
localPath: C:\Users\olav.birkeland\Desktop\QOwnNotes\Data\Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: no
activeNoteSubFolder name: empty
database file: C:\Users\olav.birkeland\Desktop\QOwnNotes\Data\Notes\notes.sqlite

Cloud connections

Cloud connection Default

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Script QOwnNotes-Script-Theme_text_highlighting

id: 1
path: C:\Users\olav.birkeland\Desktop\QOwnNotes\Data\scripts\QOwnNotes-Script-Theme_text_highlighting.qml
variablesJson: empty

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (QString): false
Debug/fileLogging (QString): false
Editor/CurrentSchemaKey (QString): EditorColorSchema-c061a447-35ef-41b5-8b4a-80ff7f7d448d
Editor/autoBracketClosing (QString): true
Editor/autoBracketRemoval (QString): true
Editor/disableCursorBlinking (QString): false
Editor/editorWidthInDFMOnly (QString): true
Editor/highlightCurrentLine (QString): true
Editor/indentSize (QString): 4
Editor/removeTrailingSpaces (QString): false
Editor/showLineNumbers (QString): false
Editor/useTabIndent (QString): false
Editor/vimMode (QString): false
FileDialog/LastPath (QString): C:/Users/olav.birkeland/Desktop/QOwnNotes/Data/scripts
FileDialog/LastPath-ScriptPath (QString): C:/Users/olav.birkeland/Desktop/QOwnNotes/Data/scripts
LastUpdateCheck (QDateTime): 2024-05-08T15:19:01.336
LogWidget/criticalLog (QString): true
LogWidget/debugLog (QString): true
LogWidget/fatalLog (QString): true
LogWidget/infoLog (QString): true
LogWidget/scriptingLog (QString): true
LogWidget/statusLog (QString): true
LogWidget/warningLog (QString): true
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (QString): 24
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteTextEdit.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,8,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (QString): true
MainWindow/noteTextView.refreshDebounceTime (QString): 600
MainWindow/noteTextView.rtl (QString): false
MainWindow/noteTextView.underline (QString): true
MainWindow/noteTextView.useEditorStyles (QString): true
MainWindow/noteTextView.useInternalExportStyling (QString): true
NoteFolder-1/NoteTabNameList (QString): Welcome to QOwnNotes
NoteFolder-1/NoteTabStickinessList: empty
NoteFolder-1/NoteTabSubFolderPathDataList (QString): empty
NoteHistory-1 (QVariantList): <variant list with 2 item(s)>
NoteHistoryCurrentIndex-1 (QString): 1
PiwikClientId (QString): <hidden>
ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data>
SearchEngineId (QString): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (QString): false
StartHidden (QString): false
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (QString): false
allowNoteEditing (bool): true
allowOnlyOneAppInstance (QString): true
appMetrics/disableAppHeartbeat (QString): false
appMetrics/disableTracking (QString): false
appMetrics/notificationShown (QString): true
autoReadOnlyMode (QString): false
autoReadOnlyModeTimeout (QString): 30
automaticNoteFolderDatabaseClosing (QString): false
checkSpelling (bool): false
closeTodoListAfterSave (QString): false
cryptoKey (QString): <hidden>
currentNoteFolderId (QString): 1
currentWorkspace (QString): initial
cursorWidth (QString): 1
darkMode (QString): true
darkModeColors (QString): true
darkModeIconTheme (QString): true
darkModeTrayIcon (QString): true
defaultNoteFileExtension (QString): md
demoNotesCreated (QString): true
disableAutomaticUpdateDialog (QString): true
disableSavedSearchesAutoCompletion (QString): false
dockWasInitializedOnce (QString): true
enableNoteTree (QString): false
enableSocketServer (QString): true
enableWebAppSupport (QString): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (QString): false
gitCommitInterval (QString): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (bool): true
ignoreAllExternalModifications (QString): false
ignoreAllExternalNoteFolderChanges (QString): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (QString): false
imageScaleDownMaximumHeight (QString): 1024
imageScaleDownMaximumWidth (QString): 1024
initialLayoutIdentifier (QString): minimal
insertTimeFormat (QString): empty
interfaceFontSize (QString): 11
interfaceLanguage (QString): empty
internalIconTheme (QString): false
itemHeight (QString): 15
legacyLinking (QString): false
localTrash/autoCleanupDays (QString): 30
localTrash/autoCleanupEnabled (QString): true
localTrash/supportEnabled (QString): true
markdownHighlightingEnabled (QString): true
navigationPanelAutoSelect (QString): true
navigationPanelHideSearch (QString): false
networking/ignoreSSLErrors (QString): true
networking/proxyType (QString): 2
newNoteAskHeadline (QString): false
noteEditIsCentralWidget (QString): true
noteFileExtensionList (QStringList): md, txt
noteListPreview (QString): false
noteSaveIntervalTime (QString): 10
noteSubfoldersPanelDisplayAsFullTree (QString): true
noteSubfoldersPanelHideSearch (QString): false
noteSubfoldersPanelOrder (QString): 0
noteSubfoldersPanelShowFullPath (QString): false
noteSubfoldersPanelShowNotesRecursively (QString): false
noteSubfoldersPanelShowRootFolderName (QString): true
noteSubfoldersPanelSort (QString): 0
noteSubfoldersPanelTabsUnsetAllNotesSelection (QString): false
notesPanelOrder (QString): 0
notesPanelSort (QString): 1
notesPath (QString): Notes
notifyAllExternalModifications (QString): false
overrideInterfaceFontSize (QString): false
ownCloud/supportEnabled (QString): false
ownCloud/todoCalendarBackend (QString): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (QString): 1
ownCloud/todoCalendarDisplayNameList: empty
ownCloud/todoCalendarEnabledList: empty
ownCloud/todoCalendarEnabledUrlList: empty
ownCloud/todoCalendarUrlList: empty
ownCloudInfo/appIsValid (bool): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
restoreCursorPosition (QString): true
restoreLastNoteAtStartup (QString): true
restoreNoteTabs (QString): true
showMatches (QString): true
showMenuBar (bool): true
showStatusBar (bool): true
startInReadOnlyMode (QString): false
systemIconTheme (QString): false
taggingShowNotesRecursively (QString): false
tagsPanelHideNoteCount (QString): false
tagsPanelHideSearch (QString): false
tagsPanelOrder (QString): 0
tagsPanelSort (QString): 0
todoCalendarSupport (QString): true
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List
toolbar/1/name (QString): mainToolBar
toolbar/1/title (QString): main toolbar
toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/2/name (QString): formattingToolbar
toolbar/2/title (QString): formatting toolbar
toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QString): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (QString): 6
useNoteFolderButtons (QString): false
useUNIXNewline (QString): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): Bookmarks
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (QString): 22222
workspace-initial/name (QString): Minimal
workspace-initial/noteSubFolderDockWidgetVisible (QString): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QString): initial

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\olav.birkeland\AppData\Roaming
CHASSIS: Notebook
ChocolateyInstall: C:\ProgramData\chocolatey\
ChocolateyLastPathUpdate: 133350220429262514
ChocolateyToolsLocation: Z:\Tools\
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: D3Z7NN3
ComSpec: C:\WINDOWS\system32\cmd.exe
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DriverData: C:\Windows\System32\Drivers\DriverData
EFC_12276: 1
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\olav.birkeland
IGCCSVC_DB: AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAaLuqtdJx1UmFb2iGEVxcqwQAAAACAAAAAAAQZgAAAAEAACAAAABg1Shx7coF1eXG1RPqiUoNkxYE4ukZZcyHj46jzHTbwwAAAAAOgAAAAAIAACAAAACr7KViAW9h8Z8K0s0lh0OBHHvQPHY19Antcn4jX6srwWAAAABxr0+6sA/jIRGtzKAjlX/PwI/nZ0GxvEVhRHlGdp0mmTsEKFzDDyI7MbklDpAPptPo3itdmPQwCJgCmsSLiV82/lN+Lxh2XefdeEl2neetKGDx1tl4Uab4b6gr7/+vUhtAAAAA1ZO5cNM1ns7JmiAMe4nvrK8XMzHrKcXtNb0eVLtk0A0g1LGuryj4WgI+pd2XmvRSbM+49b2VykGrHKMa+OdDiQ==
LIBJABRA_TRACE_LEVEL: debug
LOCALAPPDATA: C:\Users\olav.birkeland\AppData\Local
LOGONSERVER: \\D3Z7NN3
MODEL: 5570
NUMBER_OF_PROCESSORS: 20
OS: Windows_NT
Path: C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\WindowsPowerShell\Scripts;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\WinGet\Links;C:\Program Files\Azure Data Studio\bin;C:\Program Files\Cloudflare\Cloudflare WARP\;C:\Program Files\PuTTY\;C:\Program Files\gsudo\Current;C:\Program Files\Git\cmd;C:\Users\olav.birkeland\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\olav.birkeland\AppData\Local\Programs\Python\Python312\;C:\Users\olav.birkeland\AppData\Local\Programs\Python\Launcher\;C:\Users\olav.birkeland\AppData\Local\Microsoft\WindowsApps;C:\Users\olav.birkeland\AppData\Local\GitHubDesktop\bin;C:\Users\olav.birkeland\AppData\Local\Programs\Bicep CLI;C:\Users\olav.birkeland\AppData\Local\Programs\Various;C:\Users\olav.birkeland\AppData\Local\Microsoft\WinGet\Packages\unetbootin.unetbootin_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\olav.birkeland\AppData\Local\GitHubDesktop\bin;C:\Users\olav.birkeland\AppData\Local\Programs\Bicep CLI;C:\Users\olav.birkeland\AppData\Local\Google\Android Platform-Tools;C:\Program Files\Azure Data Studio\bin;C:\Users\olav.birkeland\AppData\Local\Microsoft\WinGet\Packages\pbek.QOwnNotes_Microsoft.Winget.Source_8wekyb3d8bbwe;C:\Users\olav.birkeland\.dotnet\tools;C:\Users\olav.birkeland\AppData\Local\Microsoft\PowerShell\Scripts;C:\Users\olav.birkeland\.bun\bin;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
POWERSHELL_DISTRIBUTION_CHANNEL: MSI:Windows 10 Enterprise
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 9a03
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PROMPT: $P$G
PSModulePath: C:\Users\olav.birkeland\scoop\modules;C:\Users\olav.birkeland\AppData\Local\Microsoft\PowerShell\Modules;%OneDriveCommercial%\Documents\PowerShell\Modules;
PUBLIC: C:\Users\Public
SERIAL: D3Z7NN3
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\WINDOWS
TEMP: C:\Users\OLAV~1.BIR\AppData\Local\Temp
TMP: C:\Users\OLAV~1.BIR\AppData\Local\Temp
TYPE: PRECISION
USERDOMAIN_ROAMINGPROFILE: <redacted>
USERNAME: olav.birkeland
USERPROFILE: C:\Users\olav.birkeland
windir: C:\WINDOWS
ZES_ENABLE_SYSMAN: 1
QML_DISABLE_DISK_CACHE: true

@o-l-a-v
Copy link
Author

o-l-a-v commented May 8, 2024

I created a clean Hyper-V VM from Microsoft official ISO en-us_windows_11_consumer_editions_version_23h2_updated_april_2024_x64_dvd_d986680b.iso. Chose Windows 11 Pro. Created a local user, then all I did was installing Windows Updates and reboot.

Then:

  • Downloaded QOwnNotes.zip v24.5.1, extracted it to Desktop.
  • Opened QOwnNotes.exe not in portable mode.
  • Installed script "Black mode" using the built in script installer.
  • Applied script: Took about 5 seconds.
  • Scripts -> Reload script engine was fast, did not freeze QOwnNotes and make it "Not responding".
  • Scripts -> Script settings -> Reload script engine froze QOwnNotes for about 5 seconds and made "Not responding" appear.

I don't see the same pattern in Process Monitor, but I see something that looks like telemetry that seemingly takes 2-3 seconds?

image

Output of debug:

Click to view

QOwnNotes Debug Information

General Info

Current Date: Wed May 8 16:16:45 2024
Version: 24.5.1
Build date: May 5 2024
Build number: 1097
Platform: windows (windows)
Operating System: Windows 10 Version 2009
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: no
Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments: C:\Users\localuser\Desktop\QOwnNotes\QOwnNotes.exe
Qt Debug: 0
Locale (system): en_US
Locale (interface): empty
Primary screen resolution: 1024x768
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 2
Calendar items: 0
Enabled scripts: 1
Database drivers: QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7

Server Info

serverUrl: empty
appIsValid: yes
notesPathExists: empty
serverVersion: empty
appVersion: empty

Spellchecking

Enabled: false
Selected language: empty
Language codes: empty
Language names: empty
Application dictionaries path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: 0
localPath: C:\Users\localuser\Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: no
activeNoteSubFolder name: empty
database file: C:\Users\localuser\Notes\notes.sqlite

Cloud connections

Cloud connection Default

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Script Black mode

id: 1
path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\scripts\black-mode\black-mode.qml
variablesJson:

{
    "customStylesheet": ""
}

identifier: black-mode
version: 0.0.1
minAppVersion: 17.05.7

Settings

Debug/fakeOldVersionNumber (QString): false
Debug/fileLogging (QString): false
Editor/CurrentSchemaKey (QString): EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f
Editor/autoBracketClosing (QString): true
Editor/autoBracketRemoval (QString): true
Editor/disableCursorBlinking (QString): false
Editor/editorWidthInDFMOnly (QString): true
Editor/highlightCurrentLine (QString): true
Editor/indentSize (int): 4
Editor/removeTrailingSpaces (QString): false
Editor/showLineNumbers (QString): false
Editor/useTabIndent (QString): false
Editor/vimMode (QString): false
LastUpdateCheck (QDateTime): 2024-05-08T16:09:16.727
MainWindow/mainToolBar.iconSize (int): 24
MainWindow/noteTextEdit.code.font (QString): Courier New,11,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): MS Shell Dlg 2,10,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (QString): true
MainWindow/noteTextView.refreshDebounceTime (int): 600
MainWindow/noteTextView.rtl (QString): false
MainWindow/noteTextView.underline (QString): true
MainWindow/noteTextView.useEditorStyles (QString): true
MainWindow/noteTextView.useInternalExportStyling (QString): true
NoteFolder-1/NoteTabNameList (QStringList): Welcome to QOwnNotes
NoteFolder-1/NoteTabStickinessList (QStringList): empty
NoteFolder-1/NoteTabSubFolderPathDataList (QStringList): empty
NoteHistory-1 (QVariantList): <variant list with 1 item(s)>
NoteHistoryCurrentIndex-1 (int): 0
PiwikClientId (QString): <hidden>
ScriptRepositoryDialog/geometry (QByteArray): <binary data>
ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data>
SearchEngineId (int): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (QString): false
StartHidden (QString): false
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (QString): false
allowNoteEditing (QString): true
allowOnlyOneAppInstance (QString): true
appMetrics/disableAppHeartbeat (QString): false
appMetrics/disableTracking (QString): false
appMetrics/notificationShown (QString): true
autoReadOnlyMode (QString): false
autoReadOnlyModeTimeout (int): 30
automaticNoteFolderDatabaseClosing (QString): false
checkSpelling (QString): false
closeTodoListAfterSave (QString): false
cryptoKey (qlonglong): <hidden>
currentNoteFolderId (int): 1
currentWorkspace (QString): initial
cursorWidth (int): 1
darkMode (QString): true
darkModeColors (QString): true
darkModeIconTheme (QString): true
darkModeTrayIcon (QString): true
defaultNoteFileExtension (QString): md
demoNotesCreated (QString): true
disableAutomaticUpdateDialog (QString): true
disableSavedSearchesAutoCompletion (QString): false
dockWasInitializedOnce (QString): true
enableNoteTree (QString): false
enableSocketServer (QString): true
enableWebAppSupport (QString): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (QString): false
gitCommitInterval (int): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (QString): true
ignoreAllExternalModifications (QString): false
ignoreAllExternalNoteFolderChanges (QString): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (QString): false
imageScaleDownMaximumHeight (int): 1024
imageScaleDownMaximumWidth (int): 1024
initialLayoutIdentifier (QString): minimal
insertTimeFormat (QString): empty
interfaceFontSize (int): 11
interfaceLanguage (QString): empty
internalIconTheme (QString): false
itemHeight (int): 15
legacyLinking (QString): false
localTrash/autoCleanupDays (int): 30
localTrash/autoCleanupEnabled (QString): true
localTrash/supportEnabled (QString): true
markdownHighlightingEnabled (QString): true
navigationPanelAutoSelect (QString): true
navigationPanelHideSearch (QString): false
networking/ignoreSSLErrors (QString): true
networking/proxyType (int): 2
newNoteAskHeadline (QString): false
noteEditIsCentralWidget (QString): true
noteFileExtensionList (QStringList): md, txt
noteListPreview (QString): false
noteSaveIntervalTime (int): 10
noteSubfoldersPanelDisplayAsFullTree (QString): true
noteSubfoldersPanelHideSearch (QString): false
noteSubfoldersPanelOrder (int): 0
noteSubfoldersPanelShowFullPath (QString): false
noteSubfoldersPanelShowNotesRecursively (QString): false
noteSubfoldersPanelShowRootFolderName (QString): true
noteSubfoldersPanelSort (int): 0
noteSubfoldersPanelTabsUnsetAllNotesSelection (QString): false
notesPanelOrder (int): 0
notesPanelSort (int): 1
notesPath (QString): C:/Users/localuser/Notes
notifyAllExternalModifications (QString): false
overrideInterfaceFontSize (QString): false
ownCloud/supportEnabled (QString): false
ownCloud/todoCalendarBackend (int): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (int): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (QString): true
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
restoreCursorPosition (QString): true
restoreLastNoteAtStartup (QString): true
restoreNoteTabs (QString): true
showMatches (QString): true
showMenuBar (QString): true
showStatusBar (QString): true
startInReadOnlyMode (QString): false
systemIconTheme (QString): false
taggingShowNotesRecursively (QString): false
tagsPanelHideNoteCount (QString): false
tagsPanelHideSearch (QString): false
tagsPanelOrder (int): 0
tagsPanelSort (int): 0
todoCalendarSupport (QString): true
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List
toolbar/1/name (QString): mainToolBar
toolbar/1/title (QString): main toolbar
toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/2/name (QString): formattingToolbar
toolbar/2/title (QString): formatting toolbar
toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (int): 6
useNoteFolderButtons (QString): false
useUNIXNewline (QString): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): Bookmarks
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (int): 22222
workspace-initial/name (QString): Minimal
workspace-initial/noteSubFolderDockWidgetVisible (QString): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QStringList): initial

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\localuser\AppData\Roaming
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: W1123H2
ComSpec: C:\Windows\system32\cmd.exe
DriverData: C:\Windows\System32\Drivers\DriverData
EFC_4560: 1
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\localuser
LOCALAPPDATA: C:\Users\localuser\AppData\Local
LOGONSERVER: \\W1123H2
NUMBER_OF_PROCESSORS: 8
OneDrive: C:\Users\localuser\OneDrive
OS: Windows_NT
Path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\localuser\AppData\Local\Microsoft\WindowsApps;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 9a03
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Users\LOCALU~1\AppData\Local\Temp
TMP: C:\Users\LOCALU~1\AppData\Local\Temp
USERDOMAIN: w1123h2
USERDOMAIN_ROAMINGPROFILE: w1123h2
USERNAME: localuser
USERPROFILE: C:\Users\localuser
windir: C:\Windows


I disabled heartbeat and telemtry in settings -> Network. Closed QOwnNotes. Opened QOwnNotes. Scripting -> Script settings -> Reload script engine. Shows the same behavior as when I tested portable mode on my physical machine earlier. Freezes for around 20 seconds maybe. And process monitor is spammed with the same "@2x" thing.

image

Now debug looks like this:

Click to expand

QOwnNotes Debug Information

General Info

Current Date: Wed May 8 16:23:07 2024
Version: 24.5.1
Build date: May 5 2024
Build number: 1097
Platform: windows (windows)
Operating System: Windows 10 Version 2009
Build architecture: x86_64
Current architecture: x86_64
Release: GitHub Actions
Qt Version (build): 5.15.2
Qt Version (runtime): 5.15.2
Portable mode: no
Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes
Application database path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite
Application arguments: C:\Users\localuser\Desktop\QOwnNotes\QOwnNotes.exe
Qt Debug: 0
Locale (system): en_US
Locale (interface): empty
Primary screen resolution: 1280x720
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 2
Calendar items: 0
Enabled scripts: 1
Database drivers: QSQLITE, QODBC, QODBC3, QPSQL, QPSQL7

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Spellchecking

Enabled: false
Selected language: empty
Language codes: empty
Language names: empty
Application dictionaries path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: 0
localPath: C:\Users\localuser\Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: no
allowDifferentNoteFileName: no
activeNoteSubFolder name: empty
database file: C:\Users\localuser\Notes\notes.sqlite

Cloud connections

Cloud connection Default

id: 1
isCurrent: yes
serverUrl: empty
username: empty
accountId: empty

Enabled scripts

Script Black mode

id: 1
path: C:\Users\localuser\AppData\Roaming\PBE\QOwnNotes\scripts\black-mode\black-mode.qml
variablesJson:

{
    "customStylesheet": ""
}

identifier: black-mode
version: 0.0.1
minAppVersion: 17.05.7

Settings

ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (QString): false
Debug/fileLogging (QString): false
Editor/CurrentSchemaKey (QString): EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f
Editor/autoBracketClosing (QString): true
Editor/autoBracketRemoval (QString): true
Editor/disableCursorBlinking (QString): false
Editor/editorWidthInDFMOnly (QString): true
Editor/highlightCurrentLine (QString): true
Editor/indentSize (int): 4
Editor/removeTrailingSpaces (QString): false
Editor/showLineNumbers (QString): false
Editor/useTabIndent (QString): false
Editor/vimMode (QString): false
LastUpdateCheck (QDateTime): 2024-05-08T16:19:56.709
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (int): 24
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteTextEdit.code.font (QString): Courier New,11,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): MS Shell Dlg 2,10,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): Courier New,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (QString): true
MainWindow/noteTextView.refreshDebounceTime (int): 600
MainWindow/noteTextView.rtl (QString): false
MainWindow/noteTextView.underline (QString): true
MainWindow/noteTextView.useEditorStyles (QString): true
MainWindow/noteTextView.useInternalExportStyling (QString): true
NoteFolder-1/NoteTabNameList (QStringList): Welcome to QOwnNotes
NoteFolder-1/NoteTabStickinessList (QStringList): empty
NoteFolder-1/NoteTabSubFolderPathDataList (QStringList): empty
NoteHistory-1 (QVariantList): <variant list with 1 item(s)>
NoteHistoryCurrentIndex-1 (int): 0
PiwikClientId (QString): <hidden>
ScriptRepositoryDialog/geometry (QByteArray): <binary data>
ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data>
SearchEngineId (int): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShareDialog/geometry (QByteArray): <binary data>
ShowSystemTray (QString): false
StartHidden (QString): false
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (QString): false
allowNoteEditing (QString): true
allowOnlyOneAppInstance (QString): true
appMetrics/disableAppHeartbeat (QString): true
appMetrics/disableTracking (QString): true
appMetrics/notificationShown (QString): true
autoReadOnlyMode (QString): false
autoReadOnlyModeTimeout (int): 30
automaticNoteFolderDatabaseClosing (QString): false
checkSpelling (QString): false
closeTodoListAfterSave (QString): false
cryptoKey (qlonglong): <hidden>
currentNoteFolderId (int): 1
currentWorkspace (QString): initial
cursorWidth (int): 1
darkMode (QString): true
darkModeColors (QString): true
darkModeIconTheme (QString): true
darkModeTrayIcon (QString): true
defaultNoteFileExtension (QString): md
demoNotesCreated (QString): true
disableAutomaticUpdateDialog (QString): true
disableSavedSearchesAutoCompletion (QString): false
dockWasInitializedOnce (QString): true
enableNoteTree (QString): false
enableSocketServer (QString): true
enableWebAppSupport (QString): false
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (QString): false
gitCommitInterval (int): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (QString): true
ignoreAllExternalModifications (QString): false
ignoreAllExternalNoteFolderChanges (QString): false
ignoreNoteSubFolders (QString): ^\.
ignoredNoteFiles (QString): empty
imageScaleDown (QString): false
imageScaleDownMaximumHeight (int): 1024
imageScaleDownMaximumWidth (int): 1024
initialLayoutIdentifier (QString): minimal
insertTimeFormat (QString): empty
interfaceFontSize (int): 11
interfaceLanguage (QString): empty
internalIconTheme (QString): false
itemHeight (int): 15
legacyLinking (QString): false
localTrash/autoCleanupDays (int): 30
localTrash/autoCleanupEnabled (QString): true
localTrash/supportEnabled (QString): true
markdownHighlightingEnabled (QString): true
navigationPanelAutoSelect (QString): true
navigationPanelHideSearch (QString): false
networking/ignoreSSLErrors (QString): true
networking/proxyType (int): 2
newNoteAskHeadline (QString): false
noteEditIsCentralWidget (QString): true
noteFileExtensionList (QStringList): md, txt
noteListPreview (QString): false
noteSaveIntervalTime (int): 10
noteSubfoldersPanelDisplayAsFullTree (QString): true
noteSubfoldersPanelHideSearch (QString): false
noteSubfoldersPanelOrder (int): 0
noteSubfoldersPanelShowFullPath (QString): false
noteSubfoldersPanelShowNotesRecursively (QString): false
noteSubfoldersPanelShowRootFolderName (QString): true
noteSubfoldersPanelSort (int): 0
noteSubfoldersPanelTabsUnsetAllNotesSelection (QString): false
notesPanelOrder (int): 0
notesPanelSort (int): 1
notesPath (QString): C:/Users/localuser/Notes
notifyAllExternalModifications (QString): false
overrideInterfaceFontSize (QString): false
ownCloud/supportEnabled (QString): false
ownCloud/todoCalendarBackend (int): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (int): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (QString): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
restoreCursorPosition (QString): true
restoreLastNoteAtStartup (QString): true
restoreNoteTabs (QString): true
showMatches (QString): true
showMenuBar (QString): true
showStatusBar (QString): true
startInReadOnlyMode (QString): false
systemIconTheme (QString): false
taggingShowNotesRecursively (QString): false
tagsPanelHideNoteCount (QString): false
tagsPanelHideSearch (QString): false
tagsPanelOrder (int): 0
tagsPanelSort (int): 0
todoCalendarSupport (QString): true
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List
toolbar/1/name (QString): mainToolBar
toolbar/1/title (QString): main toolbar
toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote
toolbar/2/name (QString): formattingToolbar
toolbar/2/title (QString): formatting toolbar
toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size
toolbar/5/name (QString): windowToolbar
toolbar/5/title (QString): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (int): 6
useNoteFolderButtons (QString): false
useUNIXNewline (QString): false
webAppClientService/serverUrl (QString): wss://app.qownnotes.org
webAppClientService/token (QString): <hidden>
webSocketServerService/bookmarksNoteName (QString): Bookmarks
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/commandSnippetsNoteName (QString): Commands
webSocketServerService/commandSnippetsTag (QString): commands
webSocketServerService/port (int): 22222
workspace-initial/name (QString): Minimal
workspace-initial/noteSubFolderDockWidgetVisible (QString): true
workspace-initial/windowState (QByteArray): <binary data>
workspaces (QStringList): initial

System environment

ALLUSERSPROFILE: C:\ProgramData
APPDATA: C:\Users\localuser\AppData\Roaming
CommonProgramFiles: C:\Program Files\Common Files
CommonProgramFiles(x86): C:\Program Files (x86)\Common Files
CommonProgramW6432: C:\Program Files\Common Files
COMPUTERNAME: W1123H2
ComSpec: C:\Windows\system32\cmd.exe
DriverData: C:\Windows\System32\Drivers\DriverData
EFC_4560: 1
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING: Default
HOMEDRIVE: C:
HOMEPATH: \Users\localuser
LOCALAPPDATA: C:\Users\localuser\AppData\Local
LOGONSERVER: \\W1123H2
NUMBER_OF_PROCESSORS: 8
OneDrive: C:\Users\localuser\OneDrive
OS: Windows_NT
Path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\localuser\AppData\Local\Microsoft\WindowsApps;
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE: AMD64
PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
PROCESSOR_LEVEL: 6
PROCESSOR_REVISION: 9a03
ProgramData: C:\ProgramData
ProgramFiles: C:\Program Files
ProgramFiles(x86): C:\Program Files (x86)
ProgramW6432: C:\Program Files
PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC: C:\Users\Public
SESSIONNAME: Console
SystemDrive: C:
SystemRoot: C:\Windows
TEMP: C:\Users\LOCALU~1\AppData\Local\Temp
TMP: C:\Users\LOCALU~1\AppData\Local\Temp
USERDOMAIN: w1123h2
USERDOMAIN_ROAMINGPROFILE: w1123h2
USERNAME: localuser
USERPROFILE: C:\Users\localuser
windir: C:\Windows


It happens even if no scripts are enabled, only that QOwnNotes seems to freeze for a shorter time. 5-10 seconds. And not consistently. And with same output in process monitor.

@pbek
Copy link
Owner

pbek commented May 8, 2024

I tried it out on my Windows 11 installation.

  • Run cd C:\Program Files\QOwnNotes and QOwnNotes.exe --portable
  • Just clicking next, next, next in the welcome dialog (but selecting the "Full" layout for logs)
  • Install black mode script directly from the script repository
  • Tried manually reloading the script engine multiple times

I got 0 lag, I could interact with the application all the time. 🤷🏻

Did turning off metric change anything? The network requests are supposed to run in the background anyway...

@o-l-a-v
Copy link
Author

o-l-a-v commented May 8, 2024

Strange. 🤔 Maybe it has to do with scaling and resolution? I have three monitors:

  • 2x 27" 2560x1440 with Windows scaling set to 150%.
  • 1x laptop monitor 1920x1080p with Windows scaling set to 125%.

But that wouldn't neccessarily explain why it also happened inside the VM, hmm..

Turning of metrics made it worse, but I don't know if it was due to turning metrics off or closing QOwnNotes after its' first ever run then reopening it. The spamming in procmon for creating file @2x wasn't there before the second run.


I have a Pop!_OS VM too. With the Flatpak version, enabling (ticking the checkbox) for "Black mode" from Settings -> Scripting easily takes 5-10 seconds. So does reloading script engine.

Same with the Snap version.

Disabling heartbeat and tracking does not seem to make a difference.

@pbek
Copy link
Owner

pbek commented May 8, 2024

I had a 4K screen and an HD screen attached too... No idea. I've never seen such an issue...

@o-l-a-v
Copy link
Author

o-l-a-v commented May 10, 2024

Seems it could have something to do with Qt and scaling?

@pbek
Copy link
Owner

pbek commented May 10, 2024

Good question, but in QOwnNotes QML is not used for UI, just for script support... And I also tested on a High DPI screen... 🤔

@o-l-a-v
Copy link
Author

o-l-a-v commented May 10, 2024

Seems it has something to do with scaling after all. I tried disabling "QT_AUTO_SCREEN_SCALE_FACTOR" with PowerShell:

[System.Environment]::SetEnvironmentVariable(
    'QT_AUTO_SCREEN_SCALE_FACTOR',
    0,
    'User'
)

Started QOwnNotes, tried reloading script enginge. It freezes for much shorter (still freezes though), and I can no longer see that spamming in procmon about @2x.

@pbek
Copy link
Owner

pbek commented May 10, 2024

I wonder where QT_AUTO_SCREEN_SCALE_FACTOR got set? I can't see it in your ENV dump...
But what I do see is QML_DISABLE_DISK_CACHE: true. I'm currently under NixOS, don't have that set here...
Maybe try turning that to false?

@o-l-a-v
Copy link
Author

o-l-a-v commented May 10, 2024

I think QT_AUTO_SCREEN_SCALE_FACTOR defaults to true if not set? Maybe QML_DISABLE_DISK_CACHE defaults to false on Windows for some reason?

Tried setting QML_DISABLE_DISK_CACHE to 0. It did not exist as an env variable before I did. Hard to measure whether it has an impact on performance. Opening settings still spams the Windows registry 72 times for a single registry key, ref #3027.

@pbek
Copy link
Owner

pbek commented May 10, 2024

I think QT_AUTO_SCREEN_SCALE_FACTOR defaults to true if not set?

For me, under NixOS, it's 0.

Maybe QML_DISABLE_DISK_CACHE defaults to false on Windows for some reason?

Dunno, it was true for you. ️🤷🏻

Opening settings still spams the Windows registry 72 times for a single registry key, ref #3027.

And you sure that causes a 20sec lag? (see #3027).

@o-l-a-v
Copy link
Author

o-l-a-v commented May 10, 2024

Dunno, it was true for you. ️🤷🏻

It was not set in the registry, so I don't know were it came from.

And you sure that causes a 20sec lag? (see #3027).

Yep. 15-20 seconds. Note theres a difference between:

  1. Scripting -> Reload scripting engine ( CTRL + SHIFT + S), vs
  2. Note -> Settings -> Scripting -> Reload scripting engine.
    • Much slower.

Guess I'll do some more testing on that vanilla Windows installation.

  • Portable vs. non-portable.
  • QT_AUTO_SCREEN_SCALE_FACTOR enabled vs. disabled.
  • QML_DISABLE_DISK_CACHE enabled vs. disabled.

@o-l-a-v
Copy link
Author

o-l-a-v commented May 10, 2024

Findings:

  • QML_DISABLE_DISK_CACHE is set to false when QOwnNotes.exe --portable.
  • Looking at time in procmon, telemetry or heartbeat looks like a blocking operation?
    • image
  • Scripts doing theming, like "Black mode", makes "Reload script engine" take longer than other scripts, like "Order checkboxes".
  • When tracking and heartbeat is disabled, reload script enginge is still slow. Procmon shows two registry events related to getting tracking settings takes 5 seconds.
    • image

A debug build will probably be the next step in troubleshooting here, yep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants