Found in the final review of the branch feature/remote-ssh. The problem is older than that branch: it is in every release so far.
What happens
While git runs, the gites window does not respond: no scrolling, no clicks, no keys. With a small local repository on Linux this lasts a few milliseconds, so nobody notices. It gets long when:
the repository is large, so git log takes a while;
the system is Windows, where starting a program is slow (this probably added to the "very slow" report in #2);
git runs on another machine over ssh (branch feature/remote-ssh). Every command then waits for the network, a server that does not answer freezes the window for up to 10 seconds, and a connection that died while the laptop slept could freeze it for minutes.
gites reloads the repository every time its window gets focus, and a reload runs git several times, so the freeze happens often.
Why
The Rust functions the window calls (load_repo, open_repo, commit_details, file_diff in src-tauri/src/lib.rs) are declared as plain #[tauri::command] fn. Tauri 2 runs such commands on the main thread, the same thread that draws the window. Each of them runs git and waits for it to finish.
Fix
Run these commands on another thread: #[tauri::command(async)]. They already return Result, which Tauri needs for this. For ssh, also add -o ServerAliveInterval=5 -o ServerAliveCountMax=2, so a dead connection is noticed in about 10 seconds.
The fix is being made on the branch feature/remote-ssh.
Found in the final review of the branch `feature/remote-ssh`. The problem is older than that branch: it is in every release so far.
## What happens
While git runs, the gites window does not respond: no scrolling, no clicks, no keys. With a small local repository on Linux this lasts a few milliseconds, so nobody notices. It gets long when:
- the repository is large, so `git log` takes a while;
- the system is Windows, where starting a program is slow (this probably added to the "very slow" report in #2);
- git runs on another machine over ssh (branch `feature/remote-ssh`). Every command then waits for the network, a server that does not answer freezes the window for up to 10 seconds, and a connection that died while the laptop slept could freeze it for minutes.
gites reloads the repository every time its window gets focus, and a reload runs git several times, so the freeze happens often.
## Why
The Rust functions the window calls (`load_repo`, `open_repo`, `commit_details`, `file_diff` in `src-tauri/src/lib.rs`) are declared as plain `#[tauri::command] fn`. Tauri 2 runs such commands on the main thread, the same thread that draws the window. Each of them runs git and waits for it to finish.
## Fix
Run these commands on another thread: `#[tauri::command(async)]`. They already return `Result`, which Tauri needs for this. For ssh, also add `-o ServerAliveInterval=5 -o ServerAliveCountMax=2`, so a dead connection is noticed in about 10 seconds.
The fix is being made on the branch `feature/remote-ssh`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found in the final review of the branch
feature/remote-ssh. The problem is older than that branch: it is in every release so far.What happens
While git runs, the gites window does not respond: no scrolling, no clicks, no keys. With a small local repository on Linux this lasts a few milliseconds, so nobody notices. It gets long when:
git logtakes a while;feature/remote-ssh). Every command then waits for the network, a server that does not answer freezes the window for up to 10 seconds, and a connection that died while the laptop slept could freeze it for minutes.gites reloads the repository every time its window gets focus, and a reload runs git several times, so the freeze happens often.
Why
The Rust functions the window calls (
load_repo,open_repo,commit_details,file_diffinsrc-tauri/src/lib.rs) are declared as plain#[tauri::command] fn. Tauri 2 runs such commands on the main thread, the same thread that draws the window. Each of them runs git and waits for it to finish.Fix
Run these commands on another thread:
#[tauri::command(async)]. They already returnResult, which Tauri needs for this. For ssh, also add-o ServerAliveInterval=5 -o ServerAliveCountMax=2, so a dead connection is noticed in about 10 seconds.The fix is being made on the branch
feature/remote-ssh.