Closed iwehrman closed 8 years ago
This looks good! It has reduced the number of adapterUI
calls from 8 to 2 during startup. I don't see significant performance boost either (I saw the adapterUI
calls are completed within 1ms), but it definitely make the action calls more clear (and less console outputs), so I think we should get this in.
@iwehrman I am ready to merge this, just got one question about the JSDoc. Back to you.
Thanks for the review. JSDoc issue addressed. Back to @shaoshing!
Sweet!
This PR makes three changes to avoid unnecessary action calls to update the cloaking rectangle in the adapter:
commitPanelSizes
out ofupdatePanelSizes
. The former commits changes to the adapter, while the latter only updates the bounds in the panel store.commitPanelSizes
until all panels have been initialized. This should make the calls that happen beforebeforeStartup
less costly.commitPanelSizes
to avoid committing unnecessarily. This should avoid repeatedly committing stale panel size values when, e.g., dragging a window from one display to another.@shaoshing: I haven't convinced myself that this leads to any concrete improvements. Can you take a look and make a judgement call about whether this extra complexity is warranted? I'm not sure myself yet.