Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.48k stars 809 forks source link

Dragging around is very laggy when the Moon is selected zoomed out #3804

Open henrysky opened 1 month ago

henrysky commented 1 month ago

Expected Behaviour

Dragging around even when the Moon is selected is not laggy.

Actual Behaviour

Dragging around is laggy when the Moon is selected when zoomed out. Mouse dragging is fine with other objects selected like the Sun, other planets, stars, nebulae...

This maybe is a MacOS specific issue as I cannot reproduce this issue on Windows with Nvidia graphics.

Steps to reproduce

Zoom out and select the Moon, it will be very laggy if you use your mouse to drag around. You can then select other object like the Sun, everything would be fine when you use your mouse to pan around. Selecting the moon when zoomed in does not have such issue, only zoomed out.

I have recorded a video to demonstrate

https://github.com/Stellarium/stellarium/assets/28623434/46400b3a-3f8c-45fe-a687-8fd362f0a101

System

Logfile

log.txt

henrysky commented 1 month ago

Actually I also just found out having a window that is not focused while dragging also make it very laggy, maybe the same root cause as this issue so I am just gonna post it here. Also cannot reproduce on Windows with Nvidia graphics.

Here is a demo:

https://github.com/Stellarium/stellarium/assets/28623434/addbf2ef-f88c-4cbb-a186-e4a7befc1c32

alex-w commented 1 month ago

@henrysky could you please check qt5-based package also?

10110111 commented 1 month ago

Does the object selection slowdown happen only with the Moon? What if you select Sun or some small unnamed star?

Atque commented 1 month ago

Do you have a large number of asteroids/comets loaded?

henrysky commented 1 month ago

Thanks all for your reply! The strange thing is panning around only laggy if using the macbook touchpad when the Moon is selected but not mouse which similar thing actually have been mentioned in #2947.

@alex-w using qt5 will also force it to use rosetta 2?

@10110111 Yes only happen to the Moon when using macbook touchpad and zoomed out (it is fine if using a mouse no matter what the zoom level is). If select the Sun or other stars, it is fine even with macbook touchpad no matter what the zoom level is. And I notice the framerate is always good even when panning around is laggy.

I think maybe the "halo" around the moon has something to do with this somehow. You can see in the following demo (using macbook touchpad only, no mouse) with atmosphere turned off (so you can see the halo effect around the moon), pan around is fine when the Moon is not selected. Then select the Moon, pan around is laggy. Then zoom in to the Moon until the "halo" disappeared, then pan around is very smooth. You can also see how much laggy-ness also seems to relate how much halo the Moon has when it is selected.

https://github.com/Stellarium/stellarium/assets/28623434/3ab2d061-7707-41f7-8f37-cbd52ffd30d9

@Atque I did not add any asteroids/comets manually.

alex-w commented 1 month ago

Yes for rosetta 2

gzotti commented 1 month ago

Sounds like the old (or yet another) Mac touchpad issue for me.

worachate001 commented 1 month ago

I tried switching the atmosphere model to Preetham, the lag seems to completely gone.