greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

i3status-rust make system slow #459

Closed FuGangqiang closed 4 years ago

FuGangqiang commented 5 years ago

When I use i3status, I don't feel the system delay, But when I switch to i3status-rs(master branch), I can feel the mouse delay using chrome or vscode.

If you need some command output, please let me know

here is my i3status config:

general {
    colors = true
    interval = 1
}

order += "disk /home"
order += "wireless wlp3s0"
order += "battery 0"
order += "tztime local"

disk "/home" {
    format = "%free"
}

wireless wlp3s0 {
    format_up = "%essid:%ip(%quality, %bitrate)"
    format_down = "%essid:down"
}

battery 0 {
    format = "%status %percentage %remaining %emptytime"
    format_down = "No battery"
    status_chr = "⚇ CHR"
    status_bat = "⚡ BAT"
    status_full = "☻ FULL"
    path = "/sys/class/power_supply/BAT%d/uevent"
    low_threshold = 10
}

tztime local {
    format = "%Y-%m-%d(%u)%H:%M"
}

and my i3status-rs config:

theme = "plain"
icons = "awesome"

[[block]]
block = "focused_window"
max_width = 100

[[block]]
block = "disk_space"
path = "/"
alias = "/"
info_type = "available"
unit = "GB"
interval = 20
warning = 20.0
alert = 10.0

[[block]]
block = "net"
device = "wlp3s0"
ip = true
ssid = false
signal_strength = false
speed_up = false
graph_up = false
speed_down = false
graph_down = false
interval = 5

[[block]]
block = "xrandr"
interval = 2

[[block]]
block = "sound"
step_width = 10

[[block]]
block = "battery"
interval = 10
format = "{percentage}%"

[[block]]
block = "time"
interval = 10
format = "%Y-%m-%d(%u)%H:%M"
atheriel commented 5 years ago

Do you observe that it is consuming a lot of CPU resources (e.g. in htop)?

FuGangqiang commented 5 years ago

when I move mouse quickly,
the Xorg's CPU% is around 20% in both of cases, and i3status-rs's CPU% is very slowlow(0.x%).

FuGangqiang commented 5 years ago

When I use htop, i3status-rs and move mouse quickly, I find that xorg's State changes from time to time to D: disk sleep (uninterruptible)

atheriel commented 5 years ago

and i3status-rs's CPU% is very slow.

By "slow" do you mean "high"? Higher than 20%?

FuGangqiang commented 5 years ago

oh, that's my misnomer, I'm sorry, i3status-rs's CPU% is very slowlow(0.x%). corrected above

x123 commented 4 years ago

@FuGangqiang try disabling the xrandr block, and see https://github.com/greshake/i3status-rust/issues/274

I had the same issue (slowness when using the xrandr block).

FuGangqiang commented 4 years ago

thanks for @x123

when I use config as bellow, it looks better:

[[block]]
block = "xrandr"
interval = 10