deathbeds / jupyterlab-deck

Lightweight presentations for JupyterLab
https://jupyterlab-deck.rtfd.io
BSD 3-Clause "New" or "Revised" License
41 stars 9 forks source link

Calculate notebook extents lazily #17

Closed bollwyvl closed 2 years ago

bollwyvl commented 2 years ago

Elevator Pitch

It should be possible to only update extents for a given notebook when the cell count or metadata changes.

Motivation

Currently, the two example notebooks result in _getExtents being called 450 times, with the inner loop executing 17341 times. It's like for a read-only notebook that the outer function could be called twice.

Screenshot from 2022-10-19 22-15-57

Design Ideas