deephaven / vscode-deephaven

Deephaven Visual Studio Code Extension
Apache License 2.0
3 stars 0 forks source link

Deephaven tabs that are not active appear to be using resources #52

Open chipkent opened 2 months ago

chipkent commented 2 months ago

Plugin: 1.3.0

I have been under the impression that the Web UI is smart. For example, tabs that are not on top do not update or use resources. I think they are using resources in VS Code.

from deephaven import empty_table

for i in range(100):
    print(f"Making {i}")
    a = i
    globals()[f"t{i}"] = empty_table(10).update(['X = a', 'Y = 10 * i'])
  1. connect
  2. run the code above
  3. disconnect
  4. select a tab that is not on top

That tab will render with contents in the table. Additionally, when the code is run in step 2, the top table is very slow to render.

I repeated the experiment with a dynamic table. The tables are very slow to initially render, and the data is all there when switching tabs, so I think this is not a small-static table artifact that I am seeing.


from deephaven import time_table

for i in range(100):
    print(f"Making {i}")
    a = i
    globals()[f"t{i}"] = time_table("PT1s").update(['X = a', 'Y = 10 * i'])
vbabich commented 2 months ago

It sounds like VSCode isn't lazy-loading tabs, we should load when the tab is selected.