magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.9k stars 774 forks source link

GUI: bad game performance (fps) on opened deck editor in background #12265

Open JayDi85 opened 5 months ago

JayDi85 commented 5 months ago

How to reproduce:

Possible reason: xmage uses shared deck panel (pane) for all game panels and other GUI components, so swing somehow try to render all elements, even hidden under another elements. Can be related to wrong usages of invalidate, repaint or transparent background (the last one most perspective, see https://github.com/magefree/mage/issues/12261#issuecomment-2120352023).

JayDi85 commented 5 months ago

Moving dialog over skip buttons also produce a slow performance:

shot_240520_225400

JayDi85 commented 5 months ago

Well, it's not skip buttons -- it's action buttons in lobby's games history -- if you minimize it by splitter then there aren't any performance problems on dialog moving:

shot_240520_225810

JayDi85 commented 3 months ago

There are multiple problems with too much paint calls. Example: