numbers are increasing…
and once again: so does performance :yes::up: …
Dragging the bars got a lot better in beta 6.
In beta 7 the scrolling performance with the arrow keys now got an additional boost once more.
To achieve this, I'm using a trick, which I wanted to use in earlier versions already, but wasn't able to…:
What if instead of constantly re-calculating and setting the correct position of the bars upon scrolling I was able to kind of forecast the scrolling and thus calculate it at the beginning only?
This used to be impossible, because Opera's scrolling functions are unpredictable. They are pretty fluid on small sites and lack heavily on some others – even worse: depending on the visible content the speed changes while scrolling :down:
But since I implemented my own functions which are scrolling at a constant rate, which is settable in the options, I know that speed now!
All prerequisites are fulfilled, so that's how it works now:
modern scroll calculates the time needed to scroll to the end of the page (up/down/left/right of course depending on which arrow key you're pressing). This time is used as CSS transition duration for the bar and then it is set to the end.
It'll now transition automatically without any need of further calculations.
The only thing which needs to be done is canceling that transition as soon as you release that key.
I feared that this method would be a bit inaccurate and lead to slight offsets, but I was proven wrong. I tested it a bit now and even on really long pages I found the "fake" updating pretty solid :up:
As a result, you can now use (re-enable if you deactivated it) "animate the bars during scrolling with the mouse wheel / arrow keys" with practically no performance impairments at all! :yes:
Enjoy it :cheers: 🙂