CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.72k stars 4.21k forks source link

Placing an OMT through overmap editor lags the game #77341

Open Milopetilo opened 1 month ago

Milopetilo commented 1 month ago

Describe the bug

Whenever spawning anything in through the overmap editor, the game slows to a crawl.

Attach save file

N/A

Steps to reproduce

Open the overmap editor, press s or t to open the placing menu, select anything, try moving it around, witness slowdown.

Expected behavior

The game to keep running at normal speed, maybe slightly slower.

Screenshots

No response

Versions and configuration

Additional context

No response

Procyonae commented 1 month ago

Relevant function https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/overmap_ui.cpp#L1457 and it's call https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/overmap_ui.cpp#L2131

This is pretty annoying and has existed since before I started afaik, I've tried making it invalidate/redraw both ui_adaptors only as needed and copied the more convoluted chrono based blinking and scroll timeout stuff from display() with no noticeable difference

I think it has to be to do with redrawing the map ui_adaptor bc zooming in reduces the lag considerably