abrindam / ArtemisEngineeringClient

Java client for Artemis SBS. Attempts to provide an better experience for those playing the Engineering station.
2 stars 1 forks source link

Too many update to Damcon UI making UI unusable #15

Closed abrindam closed 8 years ago

abrindam commented 8 years ago

We update the damcon UI on every network packet. This is causing close to 200% CPU usage on my computer and is making command not take for minutes at a time.

abrindam commented 8 years ago

Worth noting this does NOT happen in fake mode as change events are generated more reasonably there.

jacobmaxfrank commented 8 years ago

Can we put the netcode in its own thread? Is it already? I haven't looked at it much.

I haven't done any optimization so we could look into that if no easier options are available and rate limiting won't work.

The minimum server tick rate is 1 tick every 20 ms, right?

abrindam commented 8 years ago

Netcode is in its own thread (that's handled by the protocol library) Not 100% sure what was happening, possibly netcode thread was being starved.

The fix is we need to fire a change event to the UI layer when something it cares about changes, rather than on EVERY packet which could be due to really anything (possibly even including heartbeats).