dj95 / zjstatus

A configurable statusbar plugin for zellij
MIT License
358 stars 6 forks source link

Flash of text when creating tabs #33

Closed oredaze closed 5 months ago

oredaze commented 5 months ago

When creating new tabs (often, but not always) there will be a very quick flash of text behind the tabs that says something like: Loading probablyfilepath/zjstatus.wasm

Is it a speed issue? I thought rust is fast. Or is it wasm's fault?

dj95 commented 5 months ago

Basically zellij is creating a new instance of the plugin for each tab. How do you load zjstatus? By file or via http? How are your hardware specs?

oredaze commented 5 months ago

Loading it as file. I have nvme ssd, Ryzen 5 (3.6 GHz) running on gentoo, so I doubt I am the problem. Do you not see it when quickly adding and removing tabs?

dj95 commented 5 months ago

I don't see it on my M1Pro MacBook pro, unfortunately. Even when I switch it really fast. Also loading it via a file.

dj95 commented 5 months ago

Can you post your layout, please? I'll take a look into it, when I have time. I want to try to reproduce this on my Linux desktop. Then I'll test your setup and compare it

oredaze commented 5 months ago

I copied your example from the readme just now to try it and there is no difference. EDIT: I even built it from source just in case - same. Maybe happens 20% less often idk.

bphenriques commented 5 months ago

Basically zellij is creating a new instance of the plugin for each tab. How do you load zjstatus? By file or via http? How are your hardware specs?

It would be nice if it was a single instance across all tabs. At least for some, including my case where I just have the tab list, the weather and a clock.

Jedsek commented 5 months ago

The same problem when adding new tabs(removing has good behavior)

Jedsek commented 5 months ago

The offical tab bar will also flash (without explicit text Loading from xxx/xxx.wasm)

dj95 commented 5 months ago

I also think, that I cannot do something to resolve the issue within zjstatus, since the loading text comes from loading the plugin from file (and maybe checking/loading a cache). This is also supported by the official tab bar producing the flashing text.

Since it is not an issue within zjstatus, I would kindly ask the author (@oredaze) to open an issue on zellij's side. Feel free to reference this issue to show, that different people care about this feature and to offer a starting point for new users, that are searching for a similar issue.

oredaze commented 5 months ago

I haven't noticed the built in zellij bars doing this, but I will try asking there.