delayed workspace update

Merged
#73 · Created  · Last updated

Merged pull request

Merged in DelayedWorkspaceUpdate (pull request #73)

abf78ed·Author: ·Closed by: ·2021-09-21

Description

This pull request enables a delayed update of the Python workspace. This gives a big speed increase, especially if types are used, whose string representation (necessary for workspace) requires some process time. An example are Pandas data frames among others.

Another example is interaction (zoom, panning or other kind of updates) of matplotlib plots, since the workspace is currently updated after every interaction, e.g. every mouse move step.

Using this pull request, the workspace is updated with a small delay, such that a row of fast update requests is merged into one resulting update. This increases the speed of Matplotlib plots.

The delayed update is only applied for callback-related Python updates (e.g. GUI interaction, matplotlib plots etc.). If a script is executed or a breakpoint is reached, the workspace is updated immediately (like in the current implementation).

The standard delay is 100ms. If a new workspace update is requested within this time, the timer is restart. In order to prevent an endless delay of the update, the update is triggered at the latest 2 seconds after the first delayed event. Both time values can currently be set in the itom.ini setting file (or others):

 

[Python] pyWorkspaceUpdateTimeoutSinceFirstAction=2000 pyWorkspaceUpdateTimeoutSinceLastUpdate=100

 

0 attachments

0 comments

Loading commits...