hold_sync or equivalent for batch updating
See original GitHub issueI’d like to perform a batch update of the state of a scene graph. Display events are generated synchronously when you naively change properties (such as a transform). This causes a refresh for each change, which can get quite slow and results in “swimming” where partially updated state is displayed.
ipywidgets has a method called hold_sync, but using this with a K3D drawable doesn’t seem to help (e.g. I place all the objects I want to update in a Group, and use hold_sync on the group while making the changes). Assume that all meshes[]
have been added to the group
:
for i in range(50):
with group.hold_sync():
for j in range(len(meshes)):
meshes[j].transform.translation = [0,float(i)/10,2*j]
I’m not that familiar with ipywidgets or how this should be done.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Update a batch file from another batch file - Stack Overflow
I would like to use the answer given from the "SET /P INPUT=%=%" and have it update another batch file permanently. This is...
Read more >Windows equivalent of the Linux command 'touch'? - Super User
Just uses cmd built-ins. Both last-access and creation times updated. UPDATE. Gah! This doesn't work on read-only files, whereas touch ...
Read more >Batch for runing Windows update - Microsoft Q&A
Hi. I am trying to run Windows 10 updates with a batch file, but I seem to have hit a wall. There used...
Read more >batch-update-schedule — AWS CLI 1.27.32 Command ...
batch -update-schedule --channel-id <value> [--creates <value>] [--deletes ... Supports special keyword identifiers to substitute in segment-related values.
Read more >Batch Script - Quick Guide - Tutorialspoint
This is the simplest tool for creation of batch files. Next is the execution environment for the batch scripts. On Windows systems, this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My plan was to use K3D to visualize simulation and dynamical graphic data within a notebook environment (and not just to make movies). I was attracted to the ease of use and dynamic scene graph capabilities of K3D. I like that changing a property results in immediate display. But I also need to make big changes (like stepping forward a time step in a simulation with hundreds or thousands of objects), and for that I need some kind of batch capability. Maybe that isn’t a goal of K3D, or maybe the serialized/synchronous behavior is tied to the architecture of ipywidgets. I spent just a little time trying to read the code, but I don’t really understand the gestalt of the system. I’ll check back from time to time, but for now I’ll probably look for an alternative.
@artur-trzesiok Thanks for looking into this issue - I am pretty happy with it now and will continue with my evaluation. I tried to follow the code changes you made to implement this, but I don’t know javascript or how ipywidgets works. I still have to learn a lot.