l4l / yofi

yofi is a minimalistic menu for wayland
https://crates.io/crates/yofi
MIT License
337 stars 22 forks source link

Chinese rendering is too slow #116

Closed Qutue closed 1 year ago

Qutue commented 1 year ago

I use Source Han Sans CN and OPPO Sans fonts. Renders very slowly than with non-CJK fonts

l4l commented 1 year ago

I'll take a look soon but it probably a backend-related issue so I'm fairly limited in actions.

Is it reproduces without CJK characters entries? (you may temporarily add them to $HOME/.config/yofi/blacklist).

In the meantime you may try to use the other backend (fontkit is non-default).

Qutue commented 1 year ago

Is it reproduces without CJK characters entries? (you may temporarily add them to $HOME/.config/yofi/blacklist).

Yes. I change /etc/locale.gen, comment out zh_CN.UTF-8, only keep en_US.UTF-8, then run locale-gen and reboot system. All entries do not have CJK characters. Still slower than non-CJK fonts. I also found that using fonts containing CJK characters slows down the response of all operations, such as typing search and using the direction keys to switch entries

l4l commented 1 year ago

Yes. I change /etc/locale.gen, comment out zh_CN.UTF-8, only keep en_US.UTF-8, then run locale-gen and reboot system

Locale shall not affect anything afaik fontdue (the default font rendering backend) doesn't honor most glibc-related stuff including locales.

I also found that using fonts containing CJK characters slows down the response of all operations, such as typing search and using the direction keys to switch entries

That is somewhat expected (except the "slow" part), rendering is performed for each action that's the reason.