AlbertoPdRF / root-file-viewer

View ROOT files directly in VS Code!
https://marketplace.visualstudio.com/items?itemName=albertopdrf.root-file-viewer
MIT License
47 stars 5 forks source link

root file viewer sometimes stalls when opening large histograms #10

Closed dnwerner closed 2 years ago

dnwerner commented 3 years ago

image

When loading some large histograms, the root-file-viewer can become stuck and ends up just drawing a rectangle. I waited for quite some time, but the viewer never renders anything beyond the rectangle outline. The corresponding histogram successfully loads in the ROOT TBrowser. Both times I've been working from remote.

Related to this: It would be nice to show a progress indicator while loading large trees, because sometimes loading apparently stalls (will create a separate issue for this).

dnwerner commented 3 years ago

This can also happen when switching "Draw with" settings. I have a histogram with ~2.5e8 entries. When switching to "Draw With -> col > colz" in the right click menu, I'm also greeted by the empty white rectangle (and a broken viewport - right click, etc. don't work anymore once it stopped - closing the tab and re-opening it works - until I try to set it to "colz" again)

AlbertoPdRF commented 2 years ago

Hey @dnwerner!

I'm adding @linev to the issue for his information, as JSROOT is doing all the work here.

linev commented 2 years ago

How big is "large" histogram? Home many bins? Can you upload ROOT file which contains only this histogram?

dnwerner commented 2 years ago

Good news! With no changes on the hardware side, the histogram seems to sucessfully open now and I cannot reproduce the problem anymore (tested with JSROOT 6.3.2 in the recent VS Code 1.68.1). That is very nice to know, since after I encountered the issue in 2021 I switched to using smaller histograms. Since the original problem that I encountered seems to have been fixed somewhere along the previous releases, I think this issue can be closed.

linev commented 2 years ago

Grate!

In general - WebView inside Code has limited resources and large objects (histograms or trees) may have problems. I will try to investigate issue with large trees - I also can reproduce it on Chrome browser directly.

AlbertoPdRF commented 2 years ago

That's nice to hear! I'm closing the issue then, as we already have #11 related to the trees :slightly_smiling_face: