davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.04k stars 609 forks source link

Performance decreased drastically using the latest git version #496

Closed aomader closed 7 years ago

aomader commented 7 years ago

Version

Version: 1.2.0-167-g545be58-dirty (makepkg)

Configuration

! "Enabled modi" Set from: Default
! rofi.modi:                           window,run,ssh
! "Window width" Set from: Default
! rofi.width:                          50
! "Number of lines" Set from: Default
! rofi.lines:                          15
! "Number of columns" Set from: Default
! rofi.columns:                        1
! "Font to use" Set from: XResources
rofi.font:                           DejaVu Sans Mono 22
! "Color scheme for normal row" Set from: XResources
rofi.color-normal:                   #00ffffff, #a0a0a0, #00ffffff, #00ffffff, #676e7d
! "Color scheme for urgent row" Set from: Default
! rofi.color-urgent:                   #fdf6e3,#dc322f,#eee8d5,#dc322f,#fdf6e3
! "Color scheme for active row" Set from: Default
! rofi.color-active:                   #fdf6e3,#268bd2,#eee8d5,#268bd2,#fdf6e3
! "Color scheme window" Set from: XResources
rofi.color-window:                   #d82f343f, #2f343f
! "Border width" Set from: XResources
rofi.bw:                             0
! "Location on screen" Set from: Default
! rofi.location:                       0
! "Padding" Set from: XResources
rofi.padding:                        800
! "Y-offset relative to location" Set from: Default
! rofi.yoffset:                        0
! "X-offset relative to location" Set from: Default
! rofi.xoffset:                        0
! "Always show number of lines" Set from: Default
! rofi.fixed-num-lines:                true
! "Terminal to use" Set from: Default
! rofi.terminal:                       rofi-sensible-terminal
! "Ssh client to use" Set from: Default
! rofi.ssh-client:                     ssh
! "Ssh command to execute" Set from: Default
! rofi.ssh-command:                    {terminal} -e {ssh-client} {host}
! "Run command to execute" Set from: Default
! rofi.run-command:                    {cmd}
! "Command to get extra run targets" Set from: Default
! rofi.run-list-command:               
! "Run command to execute that runs in shell" Set from: Default
! rofi.run-shell-command:              {terminal} -e {cmd}
! "Command executed on accep-entry-custom for window modus" Set from: Default
! rofi.window-command:                 xkill -id {window}
! "Disable history in run/ssh" Set from: Default
! rofi.disable-history:                false
! "Use levenshtein sorting" Set from: Default
! rofi.levenshtein-sort:               false
! "Set case-sensitivity" Set from: Default
! rofi.case-sensitive:                 false
! "Cycle through the results list" Set from: Default
! rofi.cycle:                          true
! "Enable sidebar-mode" Set from: Default
! rofi.sidebar-mode:                   false
! "Row height (in chars)" Set from: Default
! rofi.eh:                             1
! "Enable auto select mode" Set from: Default
! rofi.auto-select:                    false
! "Parse hosts file for ssh mode" Set from: Default
! rofi.parse-hosts:                    false
! "Parse known_hosts file for ssh mode" Set from: Default
! rofi.parse-known-hosts:              true
! "Set the modi to combine in combi mode" Set from: Default
! rofi.combi-modi:                     window,run
! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default
! rofi.matching:                       normal
! "Tokenize input string" Set from: Default
! rofi.tokenize:                       true
! "Monitor id to show on" Set from: Default
! rofi.m:                              -5
! "Margin between rows" Set from: Default
! rofi.line-margin:                    2
! "Padding within rows" Set from: Default
! rofi.line-padding:                   1
! "Pre-set filter" Set from: Default
! rofi.filter:                         
! "Separator style (none, dash, solid)" Set from: XResources
rofi.separator-style:                none
! "Hide scroll-bar" Set from: XResources
rofi.hide-scrollbar:                 true
! "Fullscreen" Set from: XResources
rofi.fullscreen:                     true
! "Fake transparency" Set from: Default
! rofi.fake-transparency:              false
! "DPI" Set from: Default
! rofi.dpi:                            -1
! "Threads to use for string matching" Set from: Default
! rofi.threads:                        1
! "Scrollbar width" Set from: Default
! rofi.scrollbar-width:                8
! "Scrolling method. (0: Page, 1: Centered)" Set from: Default
! rofi.scroll-method:                  0
! "Background to use for fake transparency. (background or screenshot)" Set from: Default
! rofi.fake-background:                screenshot
! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default
! rofi.window-format:                  {w}   {c}   {t}
! "Click outside the window to exit" Set from: Default
! rofi.click-to-exit:                  true
! "Indicate how it match by underlining it." Set from: Default
! rofi.show-match:                     true
! "Pidfile location" Set from: Default
! rofi.pid:                            /run/user/1000/rofi.pid
! "Paste primary selection" Set from: Default
! rofi.kb-primary-paste:               Control+Shift+v,Shift+Insert
! "Paste clipboard" Set from: Default
! rofi.kb-secondary-paste:             Control+v,Insert
! "Clear input line" Set from: Default
! rofi.kb-clear-line:                  Control+w
! "Beginning of line" Set from: Default
! rofi.kb-move-front:                  Control+a
! "End of line" Set from: Default
! rofi.kb-move-end:                    Control+e
! "Move back one word" Set from: Default
! rofi.kb-move-word-back:              Alt+b
! "Move forward one word" Set from: Default
! rofi.kb-move-word-forward:           Alt+f
! "Move back one char" Set from: Default
! rofi.kb-move-char-back:              Left,Control+b
! "Move forward one char" Set from: Default
! rofi.kb-move-char-forward:           Right,Control+f
! "Delete previous word" Set from: Default
! rofi.kb-remove-word-back:            Control+Alt+h,Control+Backspace
! "Delete next word" Set from: Default
! rofi.kb-remove-word-forward:         Control+Alt+d
! "Delete next char" Set from: Default
! rofi.kb-remove-char-forward:         Delete,Control+d
! "Delete previous char" Set from: Default
! rofi.kb-remove-char-back:            BackSpace,Control+h
! "Delete till the end of line" Set from: Default
! rofi.kb-remove-to-eol:               Control+k
! "Delete till the start of line" Set from: Default
! rofi.kb-remove-to-sol:               Control+u
! "Accept entry" Set from: Default
! rofi.kb-accept-entry:                Control+j,Control+m,Return,KP_Enter
! "Use entered text as command (in ssh/run modi)" Set from: Default
! rofi.kb-accept-custom:               Control+Return
! "Use alternate accept command." Set from: Default
! rofi.kb-accept-alt:                  Shift+Return
! "Delete entry from history" Set from: Default
! rofi.kb-delete-entry:                Shift+Delete
! "Switch to the next mode." Set from: Default
! rofi.kb-mode-next:                   Shift+Right,Control+Tab
! "Switch to the previous mode." Set from: Default
! rofi.kb-mode-previous:               Shift+Left,Control+Shift+Tab
! "Go to the previous column" Set from: Default
! rofi.kb-row-left:                    Control+Page_Up
! "Go to the next column" Set from: Default
! rofi.kb-row-right:                   Control+Page_Down
! "Select previous entry" Set from: Default
! rofi.kb-row-up:                      Up,Control+p,Shift+Tab,Shift+ISO_Left_Tab
! "Select next entry" Set from: Default
! rofi.kb-row-down:                    Down,Control+n
! "Go to next row, if one left, accept it, if no left next mode." Set from: Default
! rofi.kb-row-tab:                     Tab
! "Go to the previous page" Set from: Default
! rofi.kb-page-prev:                   Page_Up
! "Go to the next page" Set from: Default
! rofi.kb-page-next:                   Page_Down
! "Go to the first entry" Set from: Default
! rofi.kb-row-first:                   Home,KP_Home
! "Go to the last entry" Set from: Default
! rofi.kb-row-last:                    End,KP_End
! "Set selected item as input text" Set from: Default
! rofi.kb-row-select:                  Control+space
! "Take a screenshot of the rofi window" Set from: Default
! rofi.kb-screenshot:                  Alt+Shift+S
! "Toggle case sensitivity" Set from: Default
! rofi.kb-toggle-case-sensitivity:     grave,dead_grave
! "Toggle sort" Set from: Default
! rofi.kb-toggle-sort:                 Alt+grave
! "Quit rofi" Set from: Default
! rofi.kb-cancel:                      Escape,Control+g,Control+bracketleft
! "Custom keybinding 1" Set from: Default
! rofi.kb-custom-1:                    Alt+1
! "Custom keybinding 2" Set from: Default
! rofi.kb-custom-2:                    Alt+2
! "Custom keybinding 3" Set from: Default
! rofi.kb-custom-3:                    Alt+3
! "Custom keybinding 4" Set from: Default
! rofi.kb-custom-4:                    Alt+4
! "Custom Keybinding 5" Set from: Default
! rofi.kb-custom-5:                    Alt+5
! "Custom keybinding 6" Set from: Default
! rofi.kb-custom-6:                    Alt+6
! "Custom Keybinding 7" Set from: Default
! rofi.kb-custom-7:                    Alt+7
! "Custom keybinding 8" Set from: Default
! rofi.kb-custom-8:                    Alt+8
! "Custom keybinding 9" Set from: Default
! rofi.kb-custom-9:                    Alt+9
! "Custom keybinding 10" Set from: Default
! rofi.kb-custom-10:                   Alt+0
! "Custom keybinding 11" Set from: Default
! rofi.kb-custom-11:                   Alt+Shift+1
! "Custom keybinding 12" Set from: Default
! rofi.kb-custom-12:                   Alt+Shift+2
! "Csutom keybinding 13" Set from: Default
! rofi.kb-custom-13:                   Alt+Shift+3
! "Custom keybinding 14" Set from: Default
! rofi.kb-custom-14:                   Alt+Shift+4
! "Custom keybinding 15" Set from: Default
! rofi.kb-custom-15:                   Alt+Shift+5
! "Custom keybinding 16" Set from: Default
! rofi.kb-custom-16:                   Alt+Shift+6
! "Custom keybinding 17" Set from: Default
! rofi.kb-custom-17:                   Alt+Shift+7
! "Custom keybinding 18" Set from: Default
! rofi.kb-custom-18:                   Alt+Shift+8
! "Custom Keybinding 19" Set from: Default
! rofi.kb-custom-19:                   Alt+Shift+9
! "The display name of this browser" Set from: Default
! rofi.display-ssh:                    
! "The display name of this browser" Set from: Default
! rofi.display-run:                    
! "The display name of this browser" Set from: Default
! rofi.display-drun:                   
! "The display name of this browser" Set from: Default
! rofi.display-window:                 
! "The display name of this browser" Set from: Default
! rofi.display-windowcd:               
! "The display name of this browser" Set from: Default
! rofi.display-combi:

Launch Command

I compiled rofi with --enable-timings and simple used rofi -show run.

Steps to reproduce

What behaviour you see

What behaviour you expect to see

Other resources

Here is the output of the timing log:

0.000001 (0.000000): Started
0.000028 (0.000028): source/rofi.c:main:667 
0.000065 (0.000037): source/rofi.c:main:690 
0.000069 (0.000004): source/rofi.c:main:694 
0.000249 (0.000180): source/rofi.c:main:709 Open Display
0.013427 (0.013178): source/rofi.c:main:809 Setup mainloop
0.013646 (0.000219): source/rofi.c:main:824 Startup Notification
0.013693 (0.000047): source/rofi.c:main:827 Setup abe
0.020149 (0.006456): source/rofi.c:main:864 X11 Setup 
0.020154 (0.000005): source/view.c:rofi_view_workers_initialize:1562 Setup Threadpool, start
0.020159 (0.000005): source/view.c:rofi_view_workers_initialize:1585 Setup Threadpool, done
0.020397 (0.000238): source/rofi.c:startup:535 Startup
0.020531 (0.000134): source/rofi.c:startup:559 Grab keyboard
0.027661 (0.007130): source/rofi.c:startup:561 Create Window
0.027776 (0.000115): source/rofi.c:startup:567 Parse ABE
0.027812 (0.000036): source/rofi.c:startup:572 Config sanity check
0.028525 (0.000713): source/dialogs/run.c:get_apps:245 start
0.031188 (0.002663): source/dialogs/run.c:get_apps:363 stop
0.031218 (0.000030): source/view.c:rofi_view_create:1339 
0.031220 (0.000002): source/view.c:rofi_view_create:1357 Startup notification
0.031221 (0.000001): source/view.c:rofi_view_create:1360 Get active monitor
0.032091 (0.000870): source/view.c:rofi_view_refilter:835 Filter start
0.032185 (0.000094): source/view.c:rofi_view_refilter:924 Filter done
0.032188 (0.000003): source/view.c:rofi_view_update:703 
0.039558 (0.007370): source/view.c:rofi_view_update:728 Background
0.057551 (0.017993): source/view.c:rofi_view_update:761 
0.057617 (0.000066): source/view.c:rofi_view_update:703 
0.067848 (0.010231): source/view.c:rofi_view_update:728 Background
0.172317 (0.104469): source/view.c:rofi_view_update:761 
0.172351 (0.000034): source/view.c:rofi_view_update:703 
0.181961 (0.009610): source/view.c:rofi_view_update:728 Background
0.233970 (0.052009): source/view.c:rofi_view_update:761 
1.070759 (0.836789): source/view.c:rofi_view_update:703 
1.094077 (0.023318): source/view.c:rofi_view_update:728 Background
1.166139 (0.072062): source/view.c:rofi_view_update:761 
1.166260 (0.000121): source/view.c:rofi_view_update:703 
1.177369 (0.011109): source/view.c:rofi_view_update:728 Background
1.225525 (0.048156): source/view.c:rofi_view_update:761 
1.225549 (0.000024): source/view.c:rofi_view_update:703 
1.237393 (0.011844): source/view.c:rofi_view_update:728 Background
1.307571 (0.070178): source/view.c:rofi_view_update:761 
1.307579 (0.000008): source/view.c:rofi_view_update:703 
1.317570 (0.009991): source/view.c:rofi_view_update:728 Background
1.367142 (0.049572): source/view.c:rofi_view_update:761 
1.367266 (0.000124): source/view.c:rofi_view_refilter:835 Filter start
1.368997 (0.001731): source/view.c:rofi_view_refilter:924 Filter done
1.369008 (0.000011): source/view.c:rofi_view_update:703 
1.382188 (0.013180): source/view.c:rofi_view_update:728 Background
1.441651 (0.059463): source/view.c:rofi_view_update:761 
1.446984 (0.005333): source/view.c:rofi_view_refilter:835 Filter start
1.450220 (0.003236): source/view.c:rofi_view_refilter:924 Filter done
1.450232 (0.000012): source/view.c:rofi_view_update:703 
1.466396 (0.016164): source/view.c:rofi_view_update:728 Background
1.523163 (0.056767): source/view.c:rofi_view_update:761 
1.523194 (0.000031): source/view.c:rofi_view_refilter:835 Filter start
1.524124 (0.000930): source/view.c:rofi_view_refilter:924 Filter done
1.524128 (0.000004): source/view.c:rofi_view_update:703 
1.534725 (0.010597): source/view.c:rofi_view_update:728 Background
1.599891 (0.065166): source/view.c:rofi_view_update:761 
1.599974 (0.000083): source/view.c:rofi_view_update:703 
1.613989 (0.014015): source/view.c:rofi_view_update:728 Background
1.662114 (0.048125): source/view.c:rofi_view_update:761 
1.662167 (0.000053): source/view.c:rofi_view_update:703 
1.672274 (0.010107): source/view.c:rofi_view_update:728 Background
1.740120 (0.067846): source/view.c:rofi_view_update:761 
1.740140 (0.000020): source/view.c:rofi_view_update:703 
1.750252 (0.010112): source/view.c:rofi_view_update:728 Background
1.807501 (0.057249): source/view.c:rofi_view_update:761 
1.807512 (0.000011): source/view.c:rofi_view_update:703 
1.817812 (0.010300): source/view.c:rofi_view_update:728 Background
1.867652 (0.049840): source/view.c:rofi_view_update:761 
1.867710 (0.000058): source/view.c:rofi_view_update:703 
1.882353 (0.014643): source/view.c:rofi_view_update:728 Background
1.925673 (0.043320): source/view.c:rofi_view_update:761 
1.925681 (0.000008): source/view.c:rofi_view_update:703 
1.936826 (0.011145): source/view.c:rofi_view_update:728 Background
1.995814 (0.058988): source/view.c:rofi_view_update:761 
1.995915 (0.000101): source/view.c:rofi_view_refilter:835 Filter start
1.997179 (0.001264): source/view.c:rofi_view_refilter:924 Filter done
1.997200 (0.000021): source/view.c:rofi_view_update:703 
2.015705 (0.018505): source/view.c:rofi_view_update:728 Background
2.062274 (0.046569): source/view.c:rofi_view_update:761 
2.062367 (0.000093): source/view.c:rofi_view_refilter:835 Filter start
2.063888 (0.001521): source/view.c:rofi_view_refilter:924 Filter done
2.063902 (0.000014): source/view.c:rofi_view_update:703 
2.078595 (0.014693): source/view.c:rofi_view_update:728 Background
2.125127 (0.046532): source/view.c:rofi_view_update:761 
2.125152 (0.000025): source/view.c:rofi_view_update:703 
2.135978 (0.010826): source/view.c:rofi_view_update:728 Background
2.192718 (0.056740): source/view.c:rofi_view_update:761 
2.192733 (0.000015): source/view.c:rofi_view_update:703 
2.206883 (0.014150): source/view.c:rofi_view_update:728 Background
2.260205 (0.053322): source/view.c:rofi_view_update:761 
2.260235 (0.000030): source/view.c:rofi_view_refilter:835 Filter start
2.261000 (0.000765): source/view.c:rofi_view_refilter:924 Filter done
2.261015 (0.000015): source/view.c:rofi_view_update:703 
2.271533 (0.010518): source/view.c:rofi_view_update:728 Background
2.323729 (0.052196): source/view.c:rofi_view_update:761 
2.359103 (0.035374): source/view.c:rofi_view_update:703 
2.383369 (0.024266): source/view.c:rofi_view_update:728 Background
2.443208 (0.059839): source/view.c:rofi_view_update:761 
2.443216 (0.000008): source/view.c:rofi_view_update:703 
2.453124 (0.009908): source/view.c:rofi_view_update:728 Background
2.511401 (0.058277): source/view.c:rofi_view_update:761 
2.511448 (0.000047): source/view.c:rofi_view_update:703 
2.521437 (0.009989): source/view.c:rofi_view_update:728 Background
2.574489 (0.053052): source/view.c:rofi_view_update:761 
2.574498 (0.000009): source/view.c:rofi_view_update:703 
2.585153 (0.010655): source/view.c:rofi_view_update:728 Background
2.628562 (0.043409): source/view.c:rofi_view_update:761 
2.628646 (0.000084): source/view.c:rofi_view_refilter:835 Filter start
2.630440 (0.001794): source/view.c:rofi_view_refilter:924 Filter done
2.630458 (0.000018): source/view.c:rofi_view_update:703 
2.644173 (0.013715): source/view.c:rofi_view_update:728 Background
2.692354 (0.048181): source/view.c:rofi_view_update:761 
2.692379 (0.000025): source/view.c:rofi_view_update:703 
2.703654 (0.011275): source/view.c:rofi_view_update:728 Background
2.751085 (0.047431): source/view.c:rofi_view_update:761 
2.751110 (0.000025): source/view.c:rofi_view_update:703 
2.765842 (0.014732): source/view.c:rofi_view_update:728 Background
2.808626 (0.042784): source/view.c:rofi_view_update:761 
2.808656 (0.000030): source/view.c:rofi_view_refilter:835 Filter start
2.809449 (0.000793): source/view.c:rofi_view_refilter:924 Filter done
2.809452 (0.000003): source/view.c:rofi_view_update:703 
2.820531 (0.011079): source/view.c:rofi_view_update:728 Background
2.868257 (0.047726): source/view.c:rofi_view_update:761 
2.951008 (0.082751): source/view.c:rofi_view_update:703 
2.974111 (0.023103): source/view.c:rofi_view_update:728 Background
3.041565 (0.067454): source/view.c:rofi_view_update:761 
3.041573 (0.000008): source/view.c:rofi_view_update:703 
3.051465 (0.009892): source/view.c:rofi_view_update:728 Background
3.099810 (0.048345): source/view.c:rofi_view_update:761 
3.099902 (0.000092): source/view.c:rofi_view_refilter:835 Filter start
3.101307 (0.001405): source/view.c:rofi_view_refilter:924 Filter done
3.101324 (0.000017): source/view.c:rofi_view_update:703 
3.114661 (0.013337): source/view.c:rofi_view_update:728 Background
3.159517 (0.044856): source/view.c:rofi_view_update:761 
3.159542 (0.000025): source/view.c:rofi_view_update:703 
3.170198 (0.010656): source/view.c:rofi_view_update:728 Background
3.218989 (0.048791): source/view.c:rofi_view_update:761 
3.219015 (0.000026): source/view.c:rofi_view_update:703 
3.233834 (0.014819): source/view.c:rofi_view_update:728 Background
3.291136 (0.057302): source/view.c:rofi_view_update:761 
3.291171 (0.000035): source/view.c:rofi_view_refilter:835 Filter start
3.292132 (0.000961): source/view.c:rofi_view_refilter:924 Filter done
3.292147 (0.000015): source/view.c:rofi_view_update:703 
3.300844 (0.008697): source/view.c:rofi_view_update:728 Background
3.357234 (0.056390): source/view.c:rofi_view_update:761 
3.357260 (0.000026): source/view.c:rofi_view_update:703 
3.368020 (0.010760): source/view.c:rofi_view_update:728 Background
3.418414 (0.050394): source/view.c:rofi_view_update:761 
3.418444 (0.000030): source/view.c:rofi_view_update:703 
3.432678 (0.014234): source/view.c:rofi_view_update:728 Background
3.490282 (0.057604): source/view.c:rofi_view_update:761 
3.490318 (0.000036): source/view.c:rofi_view_refilter:835 Filter start
3.491120 (0.000802): source/view.c:rofi_view_refilter:924 Filter done
3.491122 (0.000002): source/view.c:rofi_view_update:703 
3.501147 (0.010025): source/view.c:rofi_view_update:728 Background
3.558866 (0.057719): source/view.c:rofi_view_update:761 
3.558888 (0.000022): source/view.c:rofi_view_update:703 
3.569264 (0.010376): source/view.c:rofi_view_update:728 Background
3.623288 (0.054024): source/view.c:rofi_view_update:761 
3.623295 (0.000007): source/view.c:rofi_view_update:703 
3.633586 (0.010291): source/view.c:rofi_view_update:728 Background
3.682918 (0.049332): source/view.c:rofi_view_update:761 
3.903187 (0.220269): source/view.c:rofi_view_refilter:835 Filter start
3.903240 (0.000053): source/view.c:rofi_view_refilter:924 Filter done
3.903246 (0.000006): source/view.c:rofi_view_update:703 
3.933598 (0.030352): source/view.c:rofi_view_update:728 Background
4.005958 (0.072360): source/view.c:rofi_view_update:761 
4.005980 (0.000022): source/view.c:rofi_view_update:703 
4.016837 (0.010857): source/view.c:rofi_view_update:728 Background
4.062424 (0.045587): source/view.c:rofi_view_update:761 
4.062441 (0.000017): source/view.c:rofi_view_update:703 
4.073035 (0.010594): source/view.c:rofi_view_update:728 Background
4.143035 (0.070000): source/view.c:rofi_view_update:761 
4.143063 (0.000028): source/view.c:rofi_view_refilter:835 Filter start
4.143068 (0.000005): source/view.c:rofi_view_refilter:924 Filter done
4.143069 (0.000001): source/view.c:rofi_view_update:703 
4.153173 (0.010104): source/view.c:rofi_view_update:728 Background
4.208361 (0.055188): source/view.c:rofi_view_update:761 
4.208381 (0.000020): source/view.c:rofi_view_update:703 
4.219891 (0.011510): source/view.c:rofi_view_update:728 Background
4.276319 (0.056428): source/view.c:rofi_view_update:761 
4.276335 (0.000016): source/view.c:rofi_view_update:703 
4.289405 (0.013070): source/view.c:rofi_view_update:728 Background
4.344966 (0.055561): source/view.c:rofi_view_update:761 
4.345048 (0.000082): source/view.c:rofi_view_refilter:835 Filter start
4.345061 (0.000013): source/view.c:rofi_view_refilter:924 Filter done
4.345064 (0.000003): source/view.c:rofi_view_update:703 
4.365240 (0.020176): source/view.c:rofi_view_update:728 Background
4.411802 (0.046562): source/view.c:rofi_view_update:761 
4.411878 (0.000076): source/view.c:rofi_view_update:703 
4.431863 (0.019985): source/view.c:rofi_view_update:728 Background
4.478058 (0.046195): source/view.c:rofi_view_update:761 
4.478088 (0.000030): source/view.c:rofi_view_update:703 
4.488867 (0.010779): source/view.c:rofi_view_update:728 Background
4.542796 (0.053929): source/view.c:rofi_view_update:761 
4.542824 (0.000028): source/view.c:rofi_view_update:703 
4.554015 (0.011191): source/view.c:rofi_view_update:728 Background
4.628288 (0.074273): source/view.c:rofi_view_update:761 
5.511155 (0.882867): source/view.c:rofi_view_update:703 
5.523450 (0.012295): source/view.c:rofi_view_update:728 Background
5.600143 (0.076693): source/view.c:rofi_view_update:761 
5.600169 (0.000026): source/view.c:rofi_view_update:703 
5.613203 (0.013034): source/view.c:rofi_view_update:728 Background
5.659889 (0.046686): source/view.c:rofi_view_update:761 
5.659918 (0.000029): source/view.c:rofi_view_update:703 
5.670781 (0.010863): source/view.c:rofi_view_update:728 Background
5.725918 (0.055137): source/view.c:rofi_view_update:761 
5.725938 (0.000020): source/view.c:rofi_view_update:703 
5.736838 (0.010900): source/view.c:rofi_view_update:728 Background
5.792023 (0.055185): source/view.c:rofi_view_update:761 
5.792033 (0.000010): source/view.c:rofi_view_update:703 
5.802825 (0.010792): source/view.c:rofi_view_update:728 Background
5.858769 (0.055944): source/view.c:rofi_view_update:761 
5.858827 (0.000058): source/view.c:rofi_view_update:703 
5.869808 (0.010981): source/view.c:rofi_view_update:728 Background
5.925607 (0.055799): source/view.c:rofi_view_update:761 
5.925626 (0.000019): source/view.c:rofi_view_update:703 
5.936408 (0.010782): source/view.c:rofi_view_update:728 Background
5.991087 (0.054679): source/view.c:rofi_view_update:761 
5.991098 (0.000011): source/view.c:rofi_view_update:703 
6.001820 (0.010722): source/view.c:rofi_view_update:728 Background
6.058686 (0.056866): source/view.c:rofi_view_update:761 
6.058714 (0.000028): source/view.c:rofi_view_update:703 
6.069186 (0.010472): source/view.c:rofi_view_update:728 Background
6.123261 (0.054075): source/view.c:rofi_view_update:761 
6.123875 (0.000000): Stopped
DaveDavenport commented 7 years ago

Can you explain what is exactly horrible slow? from the timing log it looks like rofi is visible in 40ms

0.039558 (0.007370): source/view.c:rofi_view_update:728 Background

and a refilter (on typing) is also very fast.

aomader commented 7 years ago

I was simply moving the selected item and than quickly typing a few characters. The update after each interaction, e.g., entering a character and waiting for the screen to respond, took more than a second. If enter a few characters in quick succession, it needs a bunch of seconds to show the end result.

DaveDavenport commented 7 years ago

odd, the trace doesn't show that. I wonder if something is going wrong with repainting (so it updates, but you don't see it).

What setup do you have (Window manager, graphic card, composite manager)

DaveDavenport commented 7 years ago

You entered text and the filtering needs to be updated, so it starts filtering.

4.345048 (0.000082): source/view.c:rofi_view_refilter:835 Filter start

Then very quickly it is done

4.345061 (0.000013): source/view.c:rofi_view_refilter:924 Filter done

It then triggers a redraw of the screen

4.345064 (0.000003): source/view.c:rofi_view_update:703 
4.365240 (0.020176): source/view.c:rofi_view_update:728 Background

After 20 ms, it redrawn the background.

4.411802 (0.046562): source/view.c:rofi_view_update:761 

And 46 ms later it repainted all the widget.

so the repaint is around 66ms. While this is not incredibly fast (seems cairo on 4k is not the fastest), it does not suggest 'seconds'.

I don't have a 4k screen to test, but on 3k I haven't noticed extreme slowdowns. Ill see if I can do some testing.. is it non-fullscreen (rofi -show run -no-config ) better?

DaveDavenport commented 7 years ago

done some test with scaling the screen (xrandr -scale).. at 8k fullscreen I do notice a slight lag. Running compton (composite manager) makes it worse.

(there seems to be tripping point, where things suddenly starts lagging behind and key presses arrive late @ rofi.. wonder why).

DaveDavenport commented 7 years ago

More looking, there seems to be a tipping point at 37ms for the draw function.. at that point it starts lagging behind and then suddenly it takes a second for a new event to come in (into rofi from X). On large resolution (4800x2700) it takes 40ms to flush the internal surface to the xcb surface. (if I draw in xcb directly you get artifacts..) will continue to investigate.

DaveDavenport commented 7 years ago

Found one issues (and fixed) that caused extra rewrites. Working on another solution that hopefully improves the situation.

Still on 4800x2700 with composite manager, just painting to the xcb_window_t takes ages. (up to 120ms on my pc) this causes (why I don't know yet) some expose events to get lost.

Not yet sure what is the best to fix it, I could do partial redrawing (this is not trivial to implement and still a lot of actions will change most of the screen at once). Another, but no idea if it helps, is to give each widget it own X window. (very old (pre-cairo) rofi used to do this), not sure if this will be a speedup (but code will be less clean).

DaveDavenport commented 7 years ago

A patch to try, to see if it improves things: https://filebin.pw/Qn3n/

aomader commented 7 years ago

My setup is as follows:

Here a few remarks to your latest points:

Using your proposed patch makes the situation a bit better. The response is faster, but still far from instant. This however only applies to running rofi with compton.

DaveDavenport commented 7 years ago

Good to hear patch helps. Problem is the painting of the window with compton enabled just takes to long. I don't see a quick short-term solution to this.

I find it a bit weird that 1.2.0 did not have this problem as very little changed in the way of painting. There is some extra clipping set, I could remove that but this is only a small difference. (did some bench-marking on this before) (I did notice however that the point between smooth/non smooth is a hair trigger. I need to check if X has some kind of timeout for expose events.)

Ill keep playing with it.

DaveDavenport commented 7 years ago

While thinking I don't see a quick solution, I actually realized one, can you test the following patch: https://filebin.pw/nEuA7/ https://filebin.pw/hRul0h/

(Thanks for testing the patches, this really helps).

It is not perfect yet, but solves the problem for me at > 4k screens.

(Instead of trying to send a expose event via X. (not the best solution) I now ask the GMainloop to repaint the window the moment it becomes idle. This way I won't miss redraws.. downside might be that under heavy load redraws are done less frequent.....)

aomader commented 7 years ago

Tried it. When doing things faster you kinda feel that frames are lost, but overall it feels "better", especially when compton is not running. However, the problem still exists with compton running. It's actually quite easy to trigger the "event lost" behaviour by typing something really fast. At some point it stops updating and then nothing happens anymore, until you hit any key.

However, I still thing this patch is a worthy addition. At least in my opinion, it makes rofi behave more 'instant' when compton is not running. 👍

DaveDavenport commented 7 years ago

hmm curious weird.. with the patch it should update when it is idle, so when idle you should see the last update. The redraw should always happen when rofi is idle. Only if the cpu is fully overloaded that blinking takes all cpu (and it doesn't, and the blink should redraw the screen anyway)

I tested it here with up to 5760x3240 and it skipped a bit, but always showed the final result..

Well back to the drawing table :sweat_smile:

Edit: frustrating, I cannot reproduce this.... at 4x4 scaling 7680x4320 this pc completely gives up :smile:

DaveDavenport commented 7 years ago

Tried your exact compton flags, it is completely unusable for me.. Xorg just eats 100% cpu and halts to a grind. removing the GLX backend makes everything speedy again.

What I am experiencing with glx backend kinda feels like this: https://github.com/chjj/compton/issues/152 It just stops updating for seconds, Xorg pulls 100% cpu.

Adding --xrender-sync-fence to compton improved things for me significant, remove --paint-on-overlay even more so. Can you try this? (and non glx backend).

aomader commented 7 years ago

Thanks for the hint with compton, that actually solved the problem! It's much faster now. I also ditched (as recommended here) the xf86-video-intel driver, which also made everything a bit more snappy.

How should we proceed with this issue?

DaveDavenport commented 7 years ago

I am happy that the huge delays in redraw where not directly a rofi issue, because I was running out of ideas why final redraw did not happen. I guess the original bug is solved by this.

Still think patches are useful, they solve some clumsiness I never had reason to fix before that improves responsiveness. Also there is one more fix I want to try to see if I can make the flipping to new output faster.

DaveDavenport commented 7 years ago

The last thing seems to have been the golden solution, this is instance even with your settings on 6.5k screen. https://filebin.pw/rh5qZc/

There is slightly more glitch when resizing, will look at that.

DaveDavenport commented 7 years ago

This is now instant with the above compton: https://filebin.pw/3ciO/

aomader commented 7 years ago

The patch works and I also feel an improvement. Seems like a worthy addition.

DaveDavenport commented 7 years ago

Yeah going to merge it.. the 'flipping' (copying buffered rofi view on window) went back from > 10-20 ms for full hd to 15 us. brilliant. Need to do something similar for the fake background, but need to see how I can convert from different visuals/depths with xcb, I used a 2 x copy with cairo to do this now...

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.