Skip to content

Very slow performance opening layouts/workspaces #1053

@DrunkenToast

Description

@DrunkenToast

I used to use this project a while ago, recently I wanted to incorporate it again in a few of my scripts but it seems like opening layouts takes a significant amount of time.

Simple layouts (2 windows where 1 window is a split pane with simple commands prefilled) can take several seconds to open. It seems to linearly scale with the amount of windows as well.
This feels like something that should take milliseconds, not seconds.

Here is an extreme example of a workspace that took 25 seconds!

✓ Loaded workspace: work/haystack (~/.config/tmux-layouts/projects/work/haystack/layout.yaml) [12 win, 18 panes]
Session created in detached state.
[detached (from session work/haystack)]

~ took 25s

Repeat the following windows 6 times (for 12 total windows) and you've got the layout from above:

session_name: ${SESSION_NAME}
start_directory: ${PROJECT_DIR}
windows:
    - window_name: Editor
      layout: main-vertical
      focus: true
      options:
          main-pane-width: 75%
      panes:
          - shell_command: nvim
            focus: true
          - null

    - panes:
          - null

It's especially jarring because I feel like it definitely did not take this long with a version from months ago, though I can't say that with certainty.

This project so far does provide the most flexibility and features that I'd like to have, so thanks for the effort! <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions