enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.31k stars 318 forks source link

Blur on IDE elements occurs for a moment #7026

Closed radeusgd closed 4 months ago

radeusgd commented 1 year ago

Reposting from Discord:

https://github.com/enso-org/enso/assets/1436948/f833a5e3-db8a-408d-90ed-864fcbb43cfa

I've found a very very weird and super annoying bug in the GUI - sometimes the application is getting all blurred for a brief while and then it unblurs. I attach a video showing it happen from time to time. I thought that dragging elements in the vector editor may be what triggered it but I'm not completely sure. I think this is the first time I see a blur in the IDE since a very very long time. However back then IIRC only some visualizations were blurred. This time it seems like the whole viewport is blurred for a brief moment. The experience of this is actually extremely unpleasant (I think the video does not do it justice - IRL its much worse) - it feels as if I was looking thru binoculars and for a moment the canvas goes out of focus, or as if I were putting prescription glasses on and off - not something you want to do.

radeusgd commented 1 year ago

Edited the description - I'm actually not sure what parts are affected. What I'm sure of and what is visible on the video is that the nodes get blurred for a second.

wdanilo commented 1 year ago

It's a "feature not a bug" ;) We have implemented some optimizations that render Enso in lower resolution when its GPU time is too long. However, this does not work perfectly on all machines, as some machines don't allow us to measure the GPU time. On such machines, we can only measure the total FPS count and if it's too low, we decrease the resolution. Maybe we should make the FPS threshold smaller? I'm not sure about it. Anyway, could you show me your stats monitor (ctrl + alt + ~)? I want to confirm that your hardware does not allow for GPU timing measurements.

radeusgd commented 1 year ago

Anyway, could you show me your stats monitor (ctrl + alt + ~)? I want to confirm that your hardware does not allow for GPU timing measurements.

Sure, I will check it out after I do a rebuild around after lunch.

It's a "feature not a bug" ;)

I see. Are you considering alternative solutions there? To me this feature was making Enso literally a pain to use - my eyes were literally hurting after looking at the text getting more and less blurry again and again - I guess if the lower resolution was there all the time it could be acceptable (but it was hard to read and did not look very good). But with it slowly flickering, it is really straining the eyes, which is IMO really very bad. While I'm not a fan of sluggishness and freezing the mouse, IMO it is still tons better to freeze the mouse than to make the viewport painful to look at by blurring it...

wdanilo commented 1 year ago

Yes, I want to improve the behavior, but still Im not sure how. Let's start with understanding if your machine is not providing this data as it will tell me which "code branch" to improve. I'm almost sure that we don't get this info from you. In such a case, probably we should lower the FPS threshold there or add some timers of how often the switch can happen. I'm open for any suggestions here!

radeusgd commented 1 year ago

Anyway, could you show me your stats monitor (ctrl + alt + ~)? I want to confirm that your hardware does not allow for GPU timing measurements.

image

Looks like it works?

radeusgd commented 1 year ago

Ah, or if it's the GPU time - interestingly - it is mostly NA, but sometimes flickers with an actual value. Is that expected?

https://github.com/enso-org/enso/assets/1436948/185d9011-c516-45a9-9f25-405cd19f1d2c

radeusgd commented 1 year ago

Interestingly, after building latest develop I cannot easily reproduce this, since the IDE runs much more smoothly 😅

wdanilo commented 1 year ago

@radeusgd the monitor never shows real value. It's a rendering artifact, as the debug monitor does not work nicely with non-integer screen scaling, and it seems it's your case. So, your hardware doesn't give us this data. What computer/system is that?

wdanilo commented 1 year ago

EDIT: NO, you are right, its blurred because of the problem, but there is sometimes the value ... WOW. So basically your GPU reports it every ... few seconds? -.- What is the spec of this hardware?

radeusgd commented 1 year ago

EDIT: NO, you are right, its blurred because of the problem, but there is sometimes the value ... WOW. So basically your GPU reports it every ... few seconds? -.- What is the spec of this hardware?

image image

ThinkPad X1 Carbon gen 10 with Intel i7-1280P CPU and integrated GPU: Intel Iris Xe Graphics; running Windows 11.

wdanilo commented 1 year ago

Ok, this needs to be investigated further and thresholds need to be adjusted. Good to know that GPU can report the time so rarely!

xvcgreg commented 1 year ago

@farmaazon what has caused this regression?

wdanilo commented 1 year ago

It's not a regression. It's a feature that does not work nicely on this hardware. This feature lowers the quality of the image if rendered slow.

farmaazon commented 4 months ago

Not relevant in GUI2