Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading large .vtp files #1562

Closed
ming-origen opened this issue Aug 22, 2020 · 5 comments
Closed

Loading large .vtp files #1562

ming-origen opened this issue Aug 22, 2020 · 5 comments

Comments

@ming-origen
Copy link

ming-origen commented Aug 22, 2020

Hi, I have a .vtp file with ~6 million grids, and it's causing quite some issues when rendering with vtk.js.
It straight up freezes and later crashes Firefox, while on Chrome nothing is visible.
I have followed the example here for loading the .vtp file:
https://kitware.github.io/vtk-js/examples/GeometryViewer.html
and have verified with Paraview that the .vtp file is indeed valid.

So my question is: does vtk.js have known performance issues with large grids?
If so, what's a reasonable number of grids that can be handled?

@ming-origen ming-origen changed the title Performance issues loading large .vtp files Loading large .vtp files Aug 22, 2020
@jourdain
Copy link
Collaborator

You are probably reaching the limit of what your browser allow you to allocate as a single typed array. It might be interesting to see if WebAssembly do better for your use case since the C++ code of VTK has many optimization that don't necessary exist in JS.

@ming-origen
Copy link
Author

ming-origen commented Aug 24, 2020

Thanks for the reply. I am not very familiar with VTK, so could you shed some light on which parts can be optimized in this case?
Do you suggest that I use WebAssembly for the entire VTK codebase? Or are you referring to specific parts?

I am asking as I have noticed that you already have Paraview Glance as a Javascript+WebAssembly tool.
I have tried it on my .vtk file and it stops and says "File load failure". So I'm wondering if that's already porting Paraview completely using WebAssembly?

BTW, is there a way to get more details about "File load failure" from Paraview Glance? Maybe that'll help better identify the problem.

@jourdain
Copy link
Collaborator

ParaView Glance use vtk.js along with itk.js. The webassembly part of PVG come from itk.js with the reader sections for the medical image format (dicom, ...).

The part that I'm talking about was to use VTK/C++ as a WebAssembly component to do the read/process/render by creating some code similar to what was done here in those examples.

I'm not saying it will load your big data in your browser, but it could be interesting to see if it does.

Also, based on what you are saying we might run into browser limitation. It might be possible to improve vtk.js but I'm not sure how much room we have in that regard.

@ming-origen
Copy link
Author

Thanks! I'll start with those examples, and see where I can go from there.

@jourdain
Copy link
Collaborator

If this is still an issue, please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants