The object reference property introduced increasing stuttering based on how many object references properties are present in the object.
In our practical case we often have 8-10 properties on many objects as they participate in input-output system (and due to lack of array properties), causing a lot of stuttering on object selection every single time.
Update: It seems to be an issue with property count in general, not specific property type. Just tested against bools and mixed types - same stutters.
Reproduces both in the map editor and in the tileset editor.
No stuttering when selecting the object.
Editor stuttering proportional to amount of properties.
Example:
Tiled 1.4.3, Win10 with latest updates and drivers.
Hmm, I can't reproduce this issue on Linux, where I still don't see any lag even with 20 custom properties. I'll give it a try on Windows.
Edit: Yes, I also see this on Windows. Might get tricky to figure out why this is such a performance issue there.
This seems to be related to some excessive relayouting happening while items get added and removed. Things I tried that didn't work:
Temporarily removing the mCustomPropertiesGroup
from the view while re-adding the custom properties. I hoped this may result in less updates, but it looks like they can't be avoided this way.
Setting QTreeView::uniformRowHeights
to true
to try shortcutting the size hint calculations, but it had no effect, probably because the size hint calculations are happening in order to determine the column width.
I'm speculating a bit still, but this seems to be related to the view determining the column width for the property names column, which is set to adjust to the items. Though since this already becomes noticeable at just 10 items, there must be a lot of unnecessary work going on somewhere.
I'm not sure if it can be reasonably worked around. In the end it might be better to rewrite the Properties view, which is something I've been itching to do since a while.
Is it possible to make a temporary crutch with enabling user-controlled column widths (via settings or such)? Looks like my only option right now it to attempt to minimize the amount of properties each object hold, since some of them right now hold as much as 16 props.
@Yanrishatum Sure, I understand your pain and I'll have a look into that soon.
Alright, so while uniformRowHeights
didn't work on its own, it did wonders in combination with temporarily setting the resizeMode
to Fixed
instead of ResizeToContents
while updating the list. Now the update feels instant, at least up to about 100 custom properties. Beyond that it can still start to be a bit slow, but not as severe.
Thanks for bringing this up!
Most helpful comment
@Yanrishatum Sure, I understand your pain and I'll have a look into that soon.