snowkit / mint

A framework/renderer agnostic Minimal UI interface library for Haxe.
http://snowkit.github.io/mint/
MIT License
65 stars 19 forks source link

dragging mint.Window = massive lag (Windows 10) #48

Open twilson90 opened 8 years ago

twilson90 commented 8 years ago

It works fine if I target web, but if I target windows I get this:

capture

Interestingly, if I record it with ScreenToGif, it's much less stuttery and I get this:

animation

twilson90 commented 8 years ago

I've fixed it. The problem arose from this bit of code :

 var label = new mint.Label(...);
ed_controls.add_item(label, 0, 8);
list.size(label, width, 100);

but if I changed it to :

 var label = new mint.Label(...);
layout.size(label, width, 100);
list.add_item(label, 0, 8);

It now works. There's still an underlying bit of weirdness happening underneath which I don't understand, but it should be addressed. This only happens for the cpp build.

twilson90 commented 8 years ago

Scratch that last comment. I still have this problem with windows if they're heavily populated. I've attached a hxScout telemetry file.

laggy window.zip

ruby0x1 commented 8 years ago

Just curious if you're testing in debug or release when you're seeing this? In debug it will definitely be far more pronounced. The layouts aren't optimized or anything they're doing the most obvious stuff right now, so if you had a whole bunch of them updating when the window moves, it's possible that they're triggering themselves more than once or other things. I'll look into it but the idea is to implement the constraint system, margins is a simpler convenience in the mean time.