Cubxity / typstudio

A W.I.P desktop application for a new typesetting language, typst.
GNU General Public License v3.0
605 stars 19 forks source link

Extremely long startup times #8

Closed alerque closed 1 year ago

alerque commented 1 year ago

I haven't used many Tauri apps, but I think something is wrong at startup in my builds (for Arch Linux). I'm on a pretty beefy machine (e.g. after a cold boot Firefox starts up 6 windows and 200+ tabs from a saved session) in less than a second, maybe 600ms. Starting up typstudio by contrast takes 10-20 seconds. That's long enough to assume it crashed and start another one, then give up and open a terminal and launch another instance looking for error messages and eventually 3 instances pop up with no apparent errors.

Is there some discovery/scan/timeout something going on that might be hanging? Or some other known issue at startup?

Cubxity commented 1 year ago

There should not be any task running on startup. The startup procedure is standard to Tauri. The application (AppImage build) takes < 3s to start for me on Fedora 37 (Workstation Edition). My laptop is equipped with Ryzen 7 4700U.

This sounds weird, I'll look into it. If you can provide system details, that would be nice.

alerque commented 1 year ago

AMD Ryzen 5 3600 6-Core Processor w/ 64G RAM and Radeon RX 5500, running Wayland via Hyprland.

The system is not underpowered, so something else is wrong. I wonder, are you using Xorg or Wayland? Fedora defaults to Wayland now for most DEs if I recall.

Cubxity commented 1 year ago

AMD Ryzen 5 3600 6-Core Processor w/ 64G RAM and Radeon RX 5500, running Wayland via Hyprland.

The system is not underpowered, so something else is wrong. I wonder, are you using Xorg or Wayland? Fedora defaults to Wayland now for most DEs if I recall.

I'm running Hyprland on Wayland as well.

alerque commented 1 year ago

This may not be related to typstudio or tauri. I found another app unrelated to either of the above acting the same way that had previously been working fine. I'm going to close this until I can confirm it is actually isolated to this app and not some weird system glitch.

alerque commented 1 year ago

In case anybody else comes across this, the underlying issue here turned out to be this bug in xdg-desktop-portal-gnome. This app just happened to be the first time I came across it, but it kept cropping up in more and more apps and systems. My workaround (since I am using Hyprland anyway and don't care if I break Gnome) was to remove it and only keep the hyprland portal