Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop (running) flickering on and off when opening the new picker #8142

Closed
David-Else opened this issue Sep 1, 2023 · 7 comments · Fixed by #8148
Closed

Stop (running) flickering on and off when opening the new picker #8142

David-Else opened this issue Sep 1, 2023 · 7 comments · Fixed by #8148
Labels
C-enhancement Category: Improvements

Comments

@David-Else
Copy link
Contributor

David-Else commented Sep 1, 2023

The new nucleo picker is amazing, but it is annoying that the word (running) flickers on and off when opening the new picker however small the amount of items to pick is. It really catches the eye.

Is there a mechanism possible so that it won't display for a fraction of a second, and then only display if the search takes any longer? Maybe if it has displayed before it doesn't display again?

@David-Else David-Else added the C-enhancement Category: Improvements label Sep 1, 2023
@David-Else David-Else changed the title Stop (running) flickering on and off in the new picker Stop (running) flickering on and off in the new picker Sep 1, 2023
@pascalkuthe
Copy link
Member

This is likely because you are running on slower hardware. The running indicator is only shown if the matcher doesn't manage to complete it's matching within the current frame (10ms) or a new match was started (when streaming). We could increase the timeout but that decrease responsiveness and the sane issue would resurface on even slower hardware (or with more matches)

@David-Else
Copy link
Contributor Author

It is an i7 desktop, should be pretty decent. I can see (running) flicker on and off on file and buffer searches of any size.

We could increase the timeout but that decrease responsiveness and the sane issue would resurface on even slower hardware (or with more matches)

It is fine for it to appear when there is a lot to search for, that is expected, but with space b with one open buffer it is still briefly visible. Maybe I am being a perfectionist, but there must be a way to stop it without causing any other side effects?

I am assuming the the purpose of it is to tell people that the picker is running in case they think the machine has frozen? Nobody will worry their machine has frozen in a search lasting 100ms... unless they are particularly anxiety prone:)

@pascalkuthe
Copy link
Member

pascalkuthe commented Sep 1, 2023

I dind't manage to make it show up while opening any reasonably sized directory. Event on my slow laptop (its technically also an i7 but particularly on mobli that doesn't mean much). Only when searching $HOME or root folder. And I purpusfully used patterns that I know are worst-case scenarios for fuzzy matchers. Seems like something else might be a problem for you? 10ms is pretty long. Nucleo can fuzzy match all file paths of the linux kernel in 2ms on my machine (and that is on a single core, not in parallel like we do here) so once you hit the 10ms timeout you are really matching a lot of items and it seems reasonable to show that indicator.

The issue is that helix does not do any spinner animations or similar (on purpose, see #6446 (comment)) so while we are drawing a frame we have to decide whether to show the running indicator imiidietly. So the longer we wait the slower the frametime gets (which means the editor would take longer to respond to keypresses).The next frame will only be drawn once something about the matcher state changes (read: it's likely done by that point) so that can be arbitrary long into the future and would be too late.

The timeout is mutex based tough so maybe its your operating system being slow to notify the render thread (that would be indicative of a larger problem). What OS are you using?

@David-Else
Copy link
Contributor Author

David-Else commented Sep 1, 2023

I am using Debian 12 / Kitty using Wayland. Here is a quick 60fps screen cast of me opening the file and buffer picker many times:

https://cloud.elsewebdevelopment.com/nextcloud/index.php/s/d83kyKnFBbFzeXg

@David-Else
Copy link
Contributor Author

David-Else commented Sep 1, 2023

$ sudo lshw

debian                      
    description: Desktop Computer
    product: All Series (All)
    vendor: ASUS
    version: System Version
    serial: System Serial Number
    width: 64 bits
    capabilities: smbios-2.7 dmi-2.7 smp vsyscall32
    configuration: xxx
  *-core
       description: Motherboard
       product: H87I-PLUS
       vendor: ASUSTeK COMPUTER INC.
       physical id: 0
       version: Rev X.0x
       serial: xxx
       slot: To be filled by O.E.M.
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 2003
          date: 11/05/2014
          size: 64KiB
          capacity: 8MiB
          capabilities: pci apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: System memory
          physical id: 1
          size: 8GiB
        *-bank:0
             description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
             product: BLT4G3D1608ET3LX0.
             vendor: Conexant (Rockwell)
             physical id: 0
             serial: xxx
             slot: ChannelA-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1600MHz (0.6ns)
        *-bank:1
             description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
             product: BLT4G3D1608ET3LX0.
             vendor: Conexant (Rockwell)
             physical id: 1
             serial: xxx
             slot: ChannelB-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1600MHz (0.6ns)
     *-cache:0
          description: L1 cache
          physical id: 3c
          slot: CPU Internal L1
          size: 256KiB
          capacity: 256KiB
          capabilities: internal write-back
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: 3d
          slot: CPU Internal L2
          size: 1MiB
          capacity: 1MiB
          capabilities: internal write-back unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          physical id: 3e
          slot: CPU Internal L3
          size: 8MiB
          capacity: 8MiB
          capabilities: internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i7-4770S CPU @ 3.10GHz
          vendor: Intel Corp.
          physical id: 42
          bus info: cpu@0
          version: 6.60.3
          slot: SOCKET 1150
          size: 3673MHz
          capacity: 3900MHz
          width: 64 bits
          clock: 100MHz
          capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts md_clear flush_l1d cpufreq
          configuration: cores=4 enabledcores=4 microcode=40 threads=8
     *-pci
          description: Host bridge
          product: 4th Gen Core Processor DRAM Controller
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 06
          width: 32 bits
          clock: 33MHz
          configuration: driver=hsw_uncore
          resources: irq:0

@pascalkuthe
Copy link
Member

pascalkuthe commented Sep 1, 2023

I am using Debian 12 / Kitty using Wayland. Here is a quick 60fps screen cast of me opening the file and buffer picker many times:

cloud.elsewebdevelopment.com/nextcloud/index.php/s/d83kyKnFBbFzeXg

you only show opening the file/buffer picker. I can indeed also spot it in that case, there might be a fix for that. What I understood the issue to be is that the (running) indicator shows up every time you type something into the picker but the screen capture doesn't show that

@David-Else
Copy link
Contributor Author

you only show opening the file/buffer picker. I can indeed also spot it in that case, there might be a fix for that. What I understood the issue to be is that the (running) indicator shows up every time you type something into the picker but the screen capture doesn't show that

Great news! Sorry if I was not clear, I meant when opening the file/buffer picker. I hope there is a fix, thanks for looking into this!

@David-Else David-Else changed the title Stop (running) flickering on and off in the new picker Stop (running) flickering on and off when opening the new picker Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants