Sublime Forum

[Solved] [ST4] Slow startup on fresh install

#1

Sublime text 4 is consistently taking >25 seconds to startup on my laptop in a fresh installed state. This only happens the first time the computer is booted up, after which subsequent launching takes less than a second. Anyone have any ideas how to troubleshoot this further? I’m running Arch Linux on a dell xps 13, 8 gigs of ram, 8th gen core i5, nvme ssd…

By “freshly installed state” I mean that I deleted my ~/.config/sublime-text directory and rebooted, which I understand should put it in a freshly installed state but I could be mistaken.

Log from the console after startup:

startup, version: 4107 linux x64 channel: stable
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: /home/solaire
packages path: /home/solaire/.config/sublime-text/Packages
state path: /home/solaire/.config/sublime-text/Local
zip path: /opt/sublime_text/Packages
zip path: /home/solaire/.config/sublime-text/Installed Packages
ignored_packages: [“Vintage”]
pre session restore time: 25.5887
startup time: 25.6751
first paint time: 25.6965
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
plugins loaded

0 Likes

#2

does this happen in safe mode?
https://www.sublimetext.com/docs/safe_mode.html

0 Likes

#3

Just tried it, it still opened slowly in safe mode:


pre session restore time: 26.4103
startup time: 26.4876
first paint time: 26.5011

0 Likes

#4

in that case, it seems to be a core issue. @bschaaf

0 Likes

#5

I logged the output of “strace -r subl --safe-mode --multiinstance” if it helps

https://drive.google.com/file/d/1tk2snTklUA27YTYUSVv3xxzzDLDDnH_z/view?usp=sharing

0 Likes

#6

That strace looks pretty normal to me. Is the CPU doing a lot of work in those 25 seconds?

0 Likes

#7

It doesn’t look like it- I just took this screenshot 10 or 15 seconds into launching the application when it hadn’t launched yet. CPU usage wasn’t really moving throughout.

I don’t know if it’s worth noting but on this system I recently moved from wayland to Xorg. On my desktop, where I have a very similar setup (albeit different hardware and drivers), it starts up without an issue.

In journalctl I see a message about a portal service timing out:

Jun 08 02:28:32 arch-xps dbus-daemon[699]: [session uid=1000 pid=699] Failed to activate service ‘org.freedesktop.impl.portal.desktop.wlr’: timed out (service_start_timeout=120000ms)

Edit:

I removed xdg-desktop-portal-wlr from my system and it starts up normally now.

4 Likes

#8

Thank you so much, xdg-desktop-portal was also the culprit for me.

0 Likes