question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hold_sync or equivalent for batch updating

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hellcatscommented, Dec 20, 2019

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.

0reactions
hellcatscommented, Jan 6, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found