aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-22 19:22:17 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-22 19:22:17 +0000
commited987b2de799306d6147fb4fe471178d8d127bc9 (patch)
treeeb934036eb2e8a861b9a0fec056d5f7158966ef2 /input.c
parentshm: new function, shm_scroll() (diff)
render: use shm_scroll() when we believe it will be faster
shm_scroll() is fast when memmove() is slow. That is, when scrolling a *small* amount of lines, shm_scroll() is fast. Conversely, when scrolling a *large* number of lines, memmove() is fast. For now, assume the two methods perform _roughly_ the same given a certain number of bytes they have to touch. This means we should use shm_scroll() when number of scroll lines is less than half the screen. Otherwise we use memmove. Since we need to repair the bottom scroll region after a shm_scroll, those lines are added to the count when determining which method to use. TODO: * Check if it's worth to do shm scrolling when we have a top scroll region. * Do more performance testing with a) various amount of scrolling lines, and b) larger bottom scroll regions.
Diffstat (limited to 'input.c')
0 files changed, 0 insertions, 0 deletions