Skip to content

Latest version is slow #2704

Open
Open

Description

@danez

I have version 2.70.1 and it is slower than 2.69. It hangs when opening a new tab for example

I think it only happens when the vertical tabs are on (which I love btw). I usually have like 30 to 50 repos open

Activity

  1. DanPristupov commented on Sep 8, 2026

    @DanPristupov
    Contributor

    I think it only happens when the vertical tabs are on (which I love btw). I usually have like 30 to 50 repos open

    Please keep an eye on this for a while and confirm. I don't think there's anything inside that would contribute to worse performance.
    Have you tried to reboot the computer?

    Just in case, here is the link to the previous version: https://cdn.fork.dev/mac/Fork-2.69.0.dmg

    Here's the performance on my 5-year-old MBP:
    https://github.com/user-attachments/assets/3252b48b-ba1d-4171-859f-4ac0888aeb90

  2. danez commented on Sep 8, 2026

    @danez
    Author

    For me it is especially bad when closing a tab, opening and reordering. Also clicking the normal horizontal tabs feels nearly instant (not as instant as 2.69), clicking the vertical tabs it has a delay maybe 250-500ms.

    You can see my mouseclick as this green circle effect

    Screen.Recording.2026-09-08.at.18.40.15.mov
  3. danez commented on Sep 8, 2026

    @danez
    Author

    Also closing the whole window with the red x from macos hangs, sometimes 15s sometimes 2s with beachball.

  4. danez commented on Sep 8, 2026

    @danez
    Author

    I installed 2.69 again and it is quick and normal again

  5. leonvogt commented on Oct 2, 2026

    @leonvogt

    I experience the same. Lately, every time I cmd+tab to Fork, nothing happens for like 1–2 seconds before Fork appears.
    I've installed 2.69 again and think it's faster, but I'm not entirely sure. Sometimes it's still slow.
    I'm wondering if it got slower after I updated macOS.
    The one thing I can say for certain is that a few weeks ago, it definitely didn't feel this laggy when I cmd+tab to Fork.

  6. leo108 commented on Oct 22, 2026

    @leo108

    I think I've found what's behind this. In my case it's an NSButton leak that grows with every repository refresh. The cost shows up whenever a window's key state changes: switching tabs, cmd+tab, closing a window.

    Environment: Fork 2.70.2, macOS 27.0.1, Apple Silicon. Horizontal tabs. One large repo with several git worktrees, so its .git changes often.

    Symptom: Fork gets slower over the day. Switching tabs and clicking in the commit list lag noticeably. Restarting Fork fixes it until it builds up again. Git itself isn't slow: every command in the Stopwatch lines of Fork.log takes a few ms.

    1. Where the main thread spends its time

    Below is a 10 s sample taken while switching tabs and clicking around in a slowed-down session (2607 main-thread samples). About 31% of them end in -[NSButtonCell _setContentTintColor:], called from the window key-change notifications:

    2607 Main Thread
      802 -[NSTabBar _clickRecognized:]
        775 -[NSWindowStackController _doTabSelectionAndWindowOrderingAtIndex:]
          711 -[NSWindow makeKeyWindow]
            424 -[NSWindow _sendResignKeyWindow]
              423 -[NSNotificationCenter postNotificationName:object:userInfo:]
                392 -[NSButtonCell _setContentTintColor:]
            277 -[NSWindow becomeKeyWindow]
              277 -[NSNotificationCenter postNotificationName:object:userInfo:]
                250 -[NSButtonCell _setContentTintColor:]
      341 -[NSTableView mouseDown:]
        154 -[NSWindow becomeKeyWindow]
          134 -[NSButtonCell _setContentTintColor:]
    

    Across the whole main thread, _setContentTintColor: accounts for 821 samples. It is almost the only observer doing any work during those notifications.

    2. Object counts (heap <pid>) in the same session, ~8.5 h after launch

    14148  NSButton
     1614  NSButtonCell
      919  NSView
      564  NSTableRowView
       11  NSOutlineView
    

    That's 14k buttons for 11 repository views and a few hundred table rows.

    3. Reproduction: the buttons grow by ~20 per refresh and are never freed

    # create + delete a branch from the terminal, 5 times (= 10 refreshes)
    NSButton: 14148 -> 14333   (+185)
    
    # `git worktree add --detach` + `git worktree remove`, 3 times (= 6 refreshes)
    NSButton: 14348 -> 14497   (+149)
    

    I count them with heap $(pgrep -x Fork) | awk '$4=="NSButton"'. The number doesn't go down after the refreshes settle.

    So every refresh leaves behind roughly 20 buttons that are still registered for key-window notifications. Each tab switch or focus change then walks all of them, and the cost grows for as long as Fork runs. That fits what people describe above: tab switching, closing windows and cmd+tab all go through makeKeyWindow.

  7. DanPristupov commented on Oct 24, 2026

    @DanPristupov
    Contributor

    Can you try Fork 2.71, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions