elinks
elinks copied to clipboard
Questions regarding performance
A couple of questions regarding performance:
- Are there default settings that could be turned off to have significant effect on performance? like improving launch time.
- Scrolling by holding Up/Down arrow keys on Linux VM running on macOS appears way faster than on macOS. Particularly on macOS elinks seems to skip a couple of links between every jump when Up/Down arrow key is pressed and held. Links or Lynx doesn't do that.
- On macOS I observe that elinks constantly consumes CPU cycles when idling (didn't test on Linux VM). Not a lot, about ~400k instructions per second on Apple M1 MacBook. Links or Lynx don't consume any cycles when idling. Is there a set of settings that can disable that? I tried disabling a few timers, but that didn't help.
Ad 1) rather not. One setting to enable is compression for http, but it does not change startup time. Ad 2) no idea yet Ad 3) in the select_loop function (main/select.c) there is call to periodic_redraw_all_terminals(NULL); It is around 10fps . This function was meant to reduce CPU usage for download dialogs, but likely is not good enough. You can disable leds (indicators in the right bottom corner) in configuration and in this periodic_redraw_all_terminals increase refresh time. For example * 2 or * 3.
Ad 3) Try this ^ commit. It is 20 fps not 10, but for downloads only. You can also test after replacing calls to try_redraw_all_terminals() with redraw_all_terminals(). And test 2).
@rkd77 Your commit fixed things! Now elinks consumes 0 CPU cycles when idling, Up/Down scrolling works fast, scroll highlights every link along the way, and screen redraw upon resize also doesn't flicker. I didn't have to change anything, and works the same with my configuration or no configuration.