Vim scrolls very slowly

My vim version

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep  5 2017 11:27:38)
Included patches: 1-987
Compiled by Arch Linux

has been hit by a weird scrolling bug when

:set cursorline

or

:set relativenumber

is set. This is some regexp computation
bug

according to stackoverflow. I've simply disabled these things unless I
need to use them.