#Run on startup starts over 30 processes

6 messages · Page 1 of 1 (latest)

forest gazelle
#

I made an app that listens to certain hotkeys and opens specific apps. It runs in the background all the time and consumes at most 10MB of RAM and 0% cpu at idle. The app runs everytime you boot up your pc, but I noticed that the "Startup impact" is high on task manager. It's clear that the app starts around 33 processes and when looking at them they seem unnecessary for such a simple app. Are they necessary? if not, how do I disable them?

This is how I have it set up in rust:

.plugin(tauri_plugin_autostart::init(
    tauri_plugin_autostart::MacosLauncher::LaunchAgent,
    Some(["--hidden"].to_vec()),
))
#

I'm using tauri 2.0

{
  "$schema": "https://schema.tauri.app/config/2",
  "productName": "app-shortcuts",
  "version": "0.2.1",
  "identifier": "com.app-shortcuts.app",
  "build": {
    "beforeDevCommand": "bun run dev",
    "devUrl": "http://localhost:1420",
    "beforeBuildCommand": "bun run build",
    "frontendDist": "../dist"
  },
  "app": {
    "windows": [
      {
        "title": "App Shortcuts",
        "width": 800,
        "height": 600
      }
    ],
    "security": {
      "csp": null
    }
  },
  "bundle": {
    "active": true,
    "targets": "all",
    "icon": [
      "icons/32x32.png",
      "icons/128x128.png",
      "icons/128x128@2x.png",
      "icons/icon.icns",
      "icons/icon.ico"
    ]
  },
  "plugins": {
    "cli": {
      "args": [
        {
          "name": "hidden",
          "short": "x"
        }
      ]
    }
  }
}
#

capabilities/default.json

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": [
    "main"
  ],
  "permissions": [
    "core:default",
    "shell:allow-open",
    "store:default",
    "dialog:default",
    "global-shortcut:allow-is-registered",
    "global-shortcut:allow-register",
    "global-shortcut:allow-unregister",
    "autostart:allow-enable",
    "autostart:allow-disable",
    "autostart:allow-is-enabled"
  ]
}
hybrid lark
#

i wonder if it's just the webviews preloading or smth, cuz i noticed this too

forest gazelle
#

on startup, the window opens for a brief moment before disappearing