17 seconds cold start on Windows 10

Issue report

My Inkdrop cold start takes about 17 seconds.
The warm starts take about 2 - 2.5 seconds.

For comparison, my Discord cold start takes about 8 seconds and warm starts about 0.5 - 0.75 seconds.

I’m using Inkdrop since the beginning of 2024 and I had similar startup times since then, so I thought that’s normal.
I currently have 34 notebooks and 111 notes.
I never installed any plugins.
Inkdrop is installed on my SSD, so it should load fast.


My PC works totally fine.
PC infos:

  • Windows 10
  • 16 GB RAM
  • CPU: AMD Ryzen 5 1600 Six-Core Processor 3.5 GHz
  • GPU: GTX 1080

I posted the issue on the Discord server here: https://discord.com/channels/1261200416738250773/1261200419993161773/1344940008515309588
That’s my original Discord message:


I have a question about Inkdrop’s startup time.

When I first open Inkdrop, it takes about 17 seconds until Inkdrop is started and I can see my notes.
When I then close it and open it again, it takes about 2 - 2.5 seconds.

When I first open Discord, it takes about 8 seconds until Discord is started and I can interact with it.
When I then close it and open it again, it takes about 0.5 - 0.75 seconds.
That’s because the little tray icon stays open in the taskbar on Windows.

When I close Inkdrop, there is no tray icon, but it stays kind of “active” in the background. That’s why it only takes about 2 - 2.5 seconds to open instead of the 17 seconds.
However, after a few minutes Inkdrop shuts down in the background. When I then open it, the startup time is much longer again, about 10 - 17 seconds.
That’s really annoying because I often need to quickly search something in my notes.
When Inkdrop is still active for a few minutes in the background, a startup time of 2 - 2.5 seconds is not bad, but it’s much longer compared to Discord’s startup time of 0.5 - 0.75 seconds.

It would be awesome if Inkdrop stays active in the background with a tray icon like Discord, when I close the Indrop window.
This way I could quickly open my notes without waiting too long every time.
Many Desktop apps have the option to choose between:

  • close app completely
  • stay active in the background (with tray icon)

Is this feature already possible?
If not, do you plan on implementing something like that?
That would really boost the performance.

These are the little tray icons in the taskbar on Windows:
tray icons

Environment

  • Platform: Windows 10
  • App Version: latest version (5.10.0)

Just want to chime in and say I am also experiencing fairly long cold startup times on my Windows desktop. It’s not as bad for me but I have measured it to be roughly 10 seconds.

It’s also worth noting that the slow cold startup times on Windows isn’t anything new for me, but I can’t remember if it has always been like this or if it got worse at some point.

I’m running:

  • Windows 11 24H2
  • Inkdrop 5.10.0

Hi @Micha_Huhn

Thanks for reporting.
I tried to reproduce it on my Windows PC (11 Pro) with the following spec:

Field Value
Processor 11th Gen Intel(R) Core™ i5-11600K @ 3.90GHz 3.91 GHz
Installed RAM 32.0 GB (31.9 GB usable)
System type 64-bit operating system, x64-based processor

It usually takes ~3 seconds. I quit the app, launched an Ubuntu desktop in VM, opened some web pages like YouTube, and then launched Inkdrop, but the result was the same. So, it sounds like an environment-dependent issue, which is hard to reproduce on my end.

Inkdrop does not support running in the background, but the app waits for approximately 300ms to make sure the database file descriptor is correctly closed, which has nothing to do with something called the “active” state in the background.

I need to know what is actually taking so long on the cold launch.

Enable logging

Can you please try running the app with logging enabled?

Do you get any errors?

Other questions

  • Are you behind a web proxy?
  • Also, can you check if the launch speed is slow when you are logged out? Loading the local database could take time, which is stored in the user data directory.

It is possible to support daemonizing the app in the background, but I’d like to identify the root cause, which would be helpful for other users.

@Magnus Can you also check them?

attaching a video would be helpful :pray:

Video of cold start

Here is a video about a cold start:

In this case it took about 16 seconds to start.
I did this process multiple times but the results were the same.
When I close and open Inkdrop again (warm start), it takes about 2 seconds, but the logs are exactly the same.

Other questions

  • I’m not using a web proxy.
  • When I’m logged out, the launch speed is almost the same. Maybe 1 second faster, so about 15 - 16 seconds.

Additional information

  • My PC has enough CPU and RAM when opening Inkdrop.
  • There are Missing attribute name warnings when the app is started and when you scroll through the notes. That’s probably the same issue like in your latest YouTube video.
1 Like

I tried running Inkdrop with logging and got the following output:

2025-03-03T21:08:58.986Z app:info Creating app window
2025-03-03T21:09:00.014Z app:info Initializing inkdrop app..
2025-03-03T21:09:00.015Z app:info Starting inkdrop app..
2025-03-03T21:09:00.016Z app:info axios default config: { proxy: false, httpAgent: undefined, httpsAgent: undefined }
2025-03-03T21:09:00.027Z app:info Starting a session
2025-03-03T21:09:05.781Z app:info Starting server on 127.0.0.1:19840
2025-03-03T21:09:07.046Z app:info Command line argument: <PATH>\inkdrop\app-5.10.0\Inkdrop.exe
2025-03-03T21:09:07.047Z app:info Arguments: <PATH>\inkdrop\app-5.10.0\Inkdrop.exe
2025-03-03T21:09:07.047Z app:info Command line argument: --enable-logging
2025-03-03T21:09:07.047Z app:info Arguments: --enable-logging
[18972:0303/220911.230:INFO:CONSOLE(2453)] "Missing attribute name 'data-index={index}' on measured element.", source: <PATH>\inkdrop\app-5.10.0\resources\node_modules\@bugsnag\browser\dist\bugsnag.js (2453)
[18972:0303/220911.230:INFO:CONSOLE(2453)] "Missing attribute name 'data-index={index}' on measured element.", source: <PATH>\inkdrop\app-5.10.0\resources\node_modules\@bugsnag\browser\dist\bugsnag.js (2453)
[18972:0303/220911.230:INFO:CONSOLE(2453)] "Missing attribute name 'data-index={index}' on measured element.", source: <PATH>\inkdrop\app-5.10.0\resources\node_modules\@bugsnag\browser\dist\bugsnag.js (2453)
[18972:0303/220911.230:INFO:CONSOLE(2453)] "Missing attribute name 'data-index={index}' on measured element.", source: <PATH>\inkdrop\app-5.10.0\resources\node_modules\@bugsnag\browser\dist\bugsnag.js (2453)

I also tried logging out of Inkdrop and then starting it after a reboot to make sure it was as cold start, that resulted in the same ~10 second startup time as when logged in.

Also I didn’t capture a video but the experience is pretty close to what @Micha_Huhn has shown, the window simply takes a lot longer to show up on a cold start than on a warm one.

I noticed that I had 642 notes in the trash so I also tried deleting those to see if that has any impact, but it did not.

Additional setup information

Total notes: 111

Installed plugins:

  • inkdrop-note-templates (community)
  • toc (official)

Active plugins:

  • inkdrop-note-templates (community)
  • toc (official)
config.json

I noticed that the disabledPackages list contains some plugins that I do not have installed anymore. Additionally the themes list seem to contain a duplicate entry.

{
  "*": {
    "accent-color": {
      "accentColor": "orange"
    },
    "core": {
      "db": {
        "backupPath": "<PATH>",
        "machineId": "<ID>"
      },
      "disabledPackages": [
        "ol",
        "code-fold",
        "hovering-expansion-image",
        "admonition",
        "calc",
        "code-title",
        "copy-code-to-clipboard",
        "dblclick-expansion-image",
        "dont-need-status",
        "dont-need-tags",
        "enclose-selection",
        "footnotes",
        "hide-menu-bar",
        "img-small",
        "markdown-emoji",
        "simple-note-list",
        "table-editor",
        "plain-style-syntax-header",
        "dev-tools",
        "import-html",
        "import-markdown",
        "export-as-markdown",
        "export-print",
        "export-as-html"
      ],
      "mainWindow": {
        "acrylicEnabled": false,
        "fullscreen": false,
        "hiddenComponents": {
          "sidebar-menu": [
            "SideBarMenuStatusList",
            "SideBarMenuTagList"
          ],
          "sidebar-workspace-menu": [
            "SidebarWorkspaceMenuStatusList"
          ]
        },
        "maximized": true,
        "noteListBar": {
          "w": 296
        },
        "position": {
          "x": 294,
          "y": 87
        },
        "sideBar": {
          "w": 263
        },
        "size": {
          "h": 893,
          "w": 1297
        }
      },
      "server": {
        "auth": {
          "password": "<PASS>",
          "username": "<USER>"
        },
        "enabled": true
      },
      "themes": [
        "github-preview",
        "default-dark-syntax",
        "github-preview",
        "default-dark-ui"
      ],
      "toggleDarkThemeAutomatically": false
    },
    "editor": {
      "cursorScrollMargin": 1,
      "fontFamily": "JetBrains Mono,Hack NF,SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace",
      "fontSize": 12,
      "inlineImageWidgets": false,
      "lineNumbers": true,
      "styleActiveLine": true,
      "unorderedListBullet": "-",
      "viewMode": "sideBySide",
      "viewportMargin": 100
    },
    "img-small": {
      "imgHeight": 320
    },
    "mermaid": {
      "theme": "neutral"
    },
    "preview": {},
    "sidetoc": {
      "defaultVisible": false,
      "highlightColor": "#48BF91"
    },
    "style-override": {
      "editorMaxWidth": "75em",
      "previewBody": "\"Source Sans Pro\", \"Source Han Serif\", \"Helvetica Neue\", Georgia, serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"",
      "previewMaxWidth": "40em"
    },
    "table-editor": {}
  }
}
Hardware
CPU AMD Ryzen 5 5600X
RAM 32.0 GB
GPU NVIDIA GeForce RTX 4060 Ti
1 Like

Thank you for the detailed report!
I suspect some of the dependencies may be huge, causing it to slow down the launch speed.
I’ll look into them and try to replace them with alternatives or consider deferring loading them.

1 Like

On the topic of dependencies.
I have noticed that installing plugins not only installs the plugin dependencies but also seem to install the plugin developer dependencies. This probably isn’t the source of the slowdown, but it might have an impact.

As an example I have observed that the developer dependencies gets installed for import-markdown. For example prettier is in the installed node_modules even though when looking at the package.json and package-lock.json files it is clear to see that prettier should only ever be installed when resolving developer dependencies.

I have attached an image of the specific example for my Inkdrop installation.

I’ve done a bit of searching on Discord and it seems like someone else has noticed a similar issue, though at that time it got attributed to the dependencies of the mermaid plugin being bloated.

2 Likes

Some observations from my side:

Until now, I haven’t paid attention to the start time. But I can also confirm that it takes somewhere between 10 and 20 seconds. I can also confirm that Inkdrop starts significantly slower when launching for the first time after a reboot.

Based on that, I looked up the process activity when starting Inkdrop using procmon. It seems like the built-in Windows Defender is the reason Inkdrop starts so slowly after a reboot.

After that, I checked if adding a Windows Defender exclusion rule helps (eg Add-MpPreference -ExclusionPath "$env:LocalAppData\inkdrop\app-5.10.0"). And indeed, after excluding this directory from Windows Defender, Inkdrop now starts quickly again, taking only 2-4 seconds.

2 Likes

@Magnus Ohh, great point! Though the plugins themselves don’t load these devDependencies, I should exclude them from copying in the build process.

@Lukas You are right!!! I was just about to mention Antivirus lol
So, that’s why it starts very slow only on Windows :joy:
I suspect that why Antivirus causes it to be significantly slow is that the app package includes a lot of dependency files in Inkdrop-win32-x64\resources\node_modules. So, Windows has to scan all the files individually, which requires a long time.
I did that years ago to reduce the package size and avoid some native module loading issues, but I guess it’s possible to bundle most deps into the compiled JS files.

Great, thank you for sharing this!

I’ll try updating my webpack config.

Thanks again for helping me

3 Likes

I added C:\Users\AppData\Local\inkdrop to the Windows Defender exclusion list.
Inkdrop’s cold and warm starts take about 2.5 seconds now :star_struck:
Thank you very much guys!

1 Like