Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Redundant calls when creating cells #38

@tdudgeon

Description

@tdudgeon

When a notebook is opened multiple unnecessary calls are made when creating a cell.
Using scatterplot as an example (but presumably similar things happen with other cells) when a notebook with a cell is opened this sequence of calls seems to happen in ScatterPlotCanvasItemPanel.java:

  1. refreshPlotData() called from constructor -> causes dataset to be retrieved from service (and hence db)
  2. buildPlotJs() called from renderHead() -> results is plot being built and then resized
  3. refreshPlotData() then buildPlotJs() called from onExecute() -> causes dataset to be retrieved again from service
  4. buildPlotJs() called from renderHead() [again] -> results is plot being built, resized and built again

The net effect is that the data is retrieved from the database twice and the cell contents are created three times and resized twice.
With large datasets and lots of cells this will start to have significant impact.
It should be possible to do this with the data only being retrieved once, and the cell contents created once and not resized.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions