nglviewer / nglview

Jupyter widget to interactively view molecular structures and trajectories
http://nglviewer.org/nglview/latest/
Other
821 stars 134 forks source link

very slow if display view again if view has surface #702

Closed hainm closed 7 years ago

hainm commented 7 years ago
# 1st cell
import nglview as nv

view = nv.show_file('../ngl/data/1crn_apbs_pot.dx.gz')
view

# 2nd cell
view

The current implementation is to store a series of commands in view, if display 2nd times, those commands (e.g: loadFile) will be executed again for 2nd view.

@arose any idea solution? Clearly that I don't understand much about MVC model.

arose commented 7 years ago

In the view in the second cell, all ngl related things are executed again. In principal you could just do the rendering on a new canvas but that is not implemented in ngl.

hainm commented 7 years ago

is that something you would do in the future?

arose commented 7 years ago

no specific plans, will keep in mind when creating a separate renderer module

hainm commented 7 years ago

thanks, close now.