Search
Wednesday, 11th of July 2018, 20:59:23 UTC
2:52:24
beach
Good morning everyone!
2:59:12
loke
I have had some success in my scrolling optimisation
2:59:23
beach
Excellent! What did you do?
3:00:03
loke
Create a medthod on MOVE-SHEET, specialising on CLX panes, as jackdaniel suggested
3:00:21
loke
Redraws don't work properly yet, but the speed is absolutely amazing
3:00:37
loke
I should have something for you to test in a couple of hours. :-)
3:01:22
beach
Exceptionally, my favorite coauthor comes for lunch today (a Thursday) rather than on Wednesdays as usual, so I'll be off a lot, but I'll check in regularly.
4:05:57
loke
beach: nsrahmad did a nice code review of my changes for font replacement
4:08:41
loke
I addressed all but one of his comments. The last one is a matter of style, and I'll change that too if he insists.https://github.com/McCLIM/McCLIM/pull/498
4:10:09
loke
beach: I'm so frustrated by the way... The new scrolling is super fast and super smooth... But... There is a problem that I believe happens if the “scrolled-in” area isn't repainted fully before the next scroll event. THat causes display problems.
4:10:19
beach
I think you should supply both width and height and then IGNORE the height.
4:10:23
loke
Is there a way to force a repaint of an area “now” and not later?
4:10:24
beach
That would make it even more clear.
4:10:41
loke
beach: Possibly. We'll see what nsrahmad saus.
4:11:34
loke
Or... an alterntive... Is there a way to determine if there are more scroll events waiting?
4:12:27
beach
I am surprised. Normally each event is processed fully before the next one is read.
4:12:43
beach
Perhaps it's a simple matter of flushing some X11 buffer.
4:18:02
loke
beach: I think what happens is that after I move the visible area using xrender, I call repaint-sheet which adds a reqpaint request to the queue? But by then, there is already another scroll request in the queue, which will be processed before the repaint actually happens.
4:18:20
loke
There may be some other issue though
4:18:39
beach
What queue are you talking about here?
4:18:40
loke
but what I have noticed is that if I use the arrow buttons to scroll instead, there are no display artifacts
4:19:04
beach
Oh, you do a queue-repaint?
4:19:25
loke
No. I call REPAINT-SHEET
4:19:35
beach
Then nothing should be queued, I think.
4:19:46
beach
I may remember that wrong.
4:20:10
beach
If I remember right, the only thing I can see is if X11 has a buffer that needs flushing.
4:20:21
loke
it ends up directly calling HANDLE-REPAINT
4:21:03
beach
This is a bit fuzzy in my head at this point.
4:23:25
beach
If you have a standard-repaint-mixin, it might get queued.
4:24:02
loke
I seem to be getting display artifacts even when scrolling a single pixel by very carefully moving the mouse. It's like it copes the wrong pixel line
4:24:14
loke
Perhaps it's as simple as an off-by-1 error somewheer
4:24:15
beach
Oh, that's a different problem.
4:24:53
loke
I really want this to work. You have no idea how enjoyable it is to scroll without flickering and without slowness
4:25:08
beach
Oh, I can very well imagine. :)
4:25:34
beach
And I am very grateful to you for doing all this good work.
4:28:51
loke
I find it entertaining. And for so many other projects, I keep doing stuff someone else already ends up doing at the same time, or has already been done.
4:29:06
loke
Here I know there is no one elses work I end up duplicating. :-)
4:38:22
beach
I completely understand what you mean.
4:38:40
beach
And what you do will be useful to several other people.
4:43:19
beach
I'm off to do some exercise. I'll be back in 2 hours or so.
5:07:56
loke
Yay. Font replacement is merged. :-)
5:08:24
loke
also, I think I have determined the issue _is_ an off-by-1 problem.
5:43:30
loke
It was an off-by-one error
5:43:35
loke
caused by incorrect rounding
6:08:37
slyrus_
loke, sounds awesome!
6:09:20
loke
OK, I'm comitting a test version for you guys to play with
6:12:36
loke
Tru the render-scroll branch: https://github.com/lokedhs/McCLIM/tree/render-scroll
6:13:18
loke
I'm going for lunch now. Please let me know of any issues (and even better, if you can fix any such issues :-) )
6:13:54
loke
You get the most striking effects on very large panes with complex content
6:21:04
slyrus_
probably easily fixed but I get an error about the package log not being defined
6:26:28
slyrus_
loading log4cl fixes that problem
6:27:44
slyrus_
but there are definitely still some issues (off by one maybe?) -- e.g. see the pane hierarchy viewer
6:27:51
slyrus_
still, very promising!
6:39:39
loke
Yes. there is a one-off
6:40:12
jackdaniel
I like to call them (in my mind) Obi-wan errors
6:40:51
loke
I think I know what it is. THe request to repaint the exposed area is someotimes one pixel too small due to rounding
6:40:51
jackdaniel
I'm figuring out stream-input protocol and text gadgets
6:42:26
loke
Try to pull and try again
6:47:38
beach
loke: Congratulations to fixing the off-by-1 problem!
6:47:50
loke
There were two off-by-ones :-)
6:48:24
loke
Wow. Scriolling in climaxima is so beautiftul now, and it seems to be remarkably stable.
6:49:42
loke
beach, slyrus, jackdaniel: would you be willing to test this stuff and tell me if you're able to create problems?
6:49:56
loke
I believe this was the proper solution to scrolling uglyness. Double-buffering is not needed.
6:50:19
beach
Is Climaxima the application to test it with?
6:50:28
beach
Or can it be tested with (say) the listener?
6:50:37
beach
Alright then. Will do.
6:50:39
loke
This fix applies to all scrollable panes
7:49:34
scymtym
loke: there may be an issue with presentation highlighting. in the "Border Styles Test" demo, i placed the (mouse) cursor over one of the presentations at the bottom (the ones with yellow highlight color) and then scrolled using the mouse wheel. this resulted in half-highlighted presentations. i can make a video if you cannot reproduce the issue based on this description
7:50:03
loke
scymtym: Thanks. I'll check
7:50:15
loke
I can imagine why it happens though :-)
7:51:03
scymtym
that demo seems to be an infinite source of issues
7:51:16
loke
scymtym: You mean demodemo?
7:51:49
jackdaniel
I think that `infinite indicator` would be more appropriate ;)
7:52:38
jackdaniel
because 'source' hints, that demo is bad, while 'indicator' hints, that it is good - if it reveals issues it is rather good
7:59:02
loke
OK, I see what happens with the isseu scymtym reported
7:59:24
loke
The content of the screen is scrollbed before the repaint
7:59:55
scymtym
jackdaniel: of course in the sense of revealing issues, not causing them
8:00:53
loke
Hmm.. noo... I can't really figure out the order of mouse-movement scrolling and repaitning that would cause this
8:01:10
loke
clearly it's an issue of the contrnt scrolling away before the repaint happens, somewhow
8:01:36
loke
Did you guys find any other issues with the new scrolling?
8:06:10
loke
Did you notice an improvement?
8:10:16
scymtym
loke: definitely. scrolling is a lot less flickery
8:11:11
loke
Thanks. Glad to hear it's noticeable. :-)
8:18:30
beach
I tried it with the listener, and I think I see a difference. Scrolling is pretty smooth.
8:23:38
loke
beach: I think it's even more obvious when you use the Freetype renderer.
8:23:53
loke
Because that renderer draws text more slowly, so full repaints are painful
8:24:09
loke
beach: you are using the freetype renderer?
8:24:37
loke
Add the following to your .sbclrc
8:24:38
loke
(pushnew :mcclim-ffi-freetype *features*)
8:24:43
loke
then restart and reload
8:30:23
beach
Couldn't execute "cc": No such file or directory [Condition of type CFFI-GROVEL:GROVEL-ERROR]
8:30:51
loke
beach: YOu don't have a C compiler istalled?
8:31:11
loke
What OS are you using?
8:31:24
beach
Ubuntu GNU/Linux 18.04.
8:31:32
beach
I guess the C compiler is not installed by default.
8:31:54
loke
sudo apt-get install gcc libfreetype6-dev libharfbuzz-dev libfontconfig1-dev
8:32:00
loke
install that, and it'll work
8:32:47
beach
That's a lot of non-Common Lisp software.
8:33:46
loke
You need the development libraries because of CFFI-Grovel. It would be psosible to avoid that, but it'd take some work that I dont' want to undertake right now.
8:34:01
loke
That would remove the dependency on gcc and all the devel packages
8:35:39
beach
I don't see a difference is scrolling behavior. It flashes a lot. Am I using the wrong branch or something?
8:35:53
loke
beach: Which branch are you using?
8:36:05
beach
I don't know. The default one I guess.
8:36:15
loke
Ah, right. My scrolling stuff hasn't been merged
8:36:32
loke
You have to use the “render-scroll” branch
8:39:07
beach
I still see no difference.
8:39:29
loke
you are using my fork, no?
8:39:32
beach
I did git branch render-scroll.
8:39:42
beach
But when I do git branch, it still shows master.
8:39:53
loke
you have to do "git checkout render-scroll"
8:40:02
loke
because OF COURSE you do. Git is like that
8:40:03
beach
This is getting too complicated.
8:40:21
loke
I know. I would love to see something other than Git being used.
8:42:07
beach
Still no difference. Do I have to restart SBCL?
8:43:30
beach
Restarted SBCL. Still no difference.
8:44:52
loke
are you are sure you have my changes?
8:45:01
loke
If you did git branch, you'd have created a local branch
8:45:12
loke
and even a git checkout wouldn't pick up the upstream branch
8:45:39
beach
I do not like this kind of activity AT ALL.
8:45:41
loke
(I'm probably using wrong terminoloy, but seriously, screw git)
8:45:55
loke
hang on. let me see if I can figure out how to recover
8:46:04
loke
(you've broken your git repository)
8:46:31
beach
I never use branches myself, so as to avoid this kind of crap.
8:47:31
loke
Yep. I repreoduced what you did
8:48:53
loke
git checkout origin render-scroll
8:49:02
loke
git pull origin render-scroll
8:49:26
beach
I of course do not have an "origin" in my remote.
8:49:31
loke
if it worked, you should get a list of files that have been changed, including Backends/CLX/medium.lisp
8:49:34
beach
Should I replace "origin" by my name?
8:50:01
loke
beach: hmm... what did you do when you checked out my fork?
8:50:21
loke
I'd have expected yuo to simply use "git clone whatever/lokedhs/mcclim"
8:50:44
loke
“origin” is the default name of the remote from which you originally cloned
8:50:52
beach
git checkout origin render-scroll gives me error: pathspec 'origin' did not match any file(s) known to git.
8:51:08
loke
right. you should use pull, bnot checkout
8:51:12
loke
it was a typo on my part
8:51:45
loke
(welcome to my world... I have to deal with git's madness on an almost daily basis)
8:51:58
loke
And git _still_ doesn't make sense to me.
8:52:08
beach
fatal: Couldn't find remote ref render-scroll
8:52:18
loke
beach: Are you using my fork?
8:53:27
loke
do the following: “git clone https://github.com/lokedhs/McCLIM mcclim-loke”. Then “cd mcclim-loke” and finally “git checkout render-scroll”
8:53:55
beach
I need to do that in a different directory, right?
8:54:09
loke
beach: yes, you can do it next top the default McCLIM directory
8:54:18
loke
it'll create a new mcclim directory called mcclim-loke
8:54:46
loke
gahhh.... I can't type today.
8:54:56
beach
and then I suppose I need a link in local-projects and register-local-projects, and then it won't know which one I want?
8:55:08
beach
So then when I want to go back, what do I need to do?
8:55:21
beach
And what do I do to fix my now broken GIT repository?
8:55:22
loke
beach: well, either that... or, better, would be to temporarily rename the old McCLIM directory
8:55:51
loke
beach: as for the original git repository, just doing “git checkout master” should get you back
8:56:24
loke
beach: You're still going to have a branch sitting there with the name ‘render-scroll’, but it'll be harmless.
8:57:02
loke
you can delete that if you want: “git branch -d render-scroll”
8:58:15
loke
You don't have to tell me how much git sucks...
8:58:40
loke
Please do. I need to hear it. There are far too many brainwashed people who actually believe it's well designed.
Thursday, 12th of July 2018, 8:59:23 UTC