About paraview module import latency and fetch function execution latency

I am a developer making a CFD tool.
The mesh file is handled using the Paraview module.
Currently, after uploading the mesh file, data is imported and processed through the Paraview.servermanager.Fetch function.
Here, there is a delay of 4 seconds when importing the Paraview module.
And fetching takes too long.
Any solution?

I’m not sure what you mean by “imported and processed by the Fetch function”. If you are using Fetch, that means your data is distributed or remote. Can’t you process it remotely and just send the small data that you actually need?

You will need to provide a better explanation of your needs or context as I can’t tell if those 4s are expected due to the amount of data that get retrieved over the network or not.

Oh, sorry!
Currently, I am using the Fetch function provided by paraview Python through AWS Lambda. In that situation, I wanted to say that it takes 4 seconds to import the Fetch module.

스크린샷 2022-08-26 오전 9.22.19
스크린샷 2022-08-26 오전 9.22.00

I use like this.
But Fetch speed is sooooo late!

Are you saying

from paraview import servermanager as sm # that line takes 4s?
vtk_data = sm.Fetch(edges) # or is it that line that takes 4s?

Also why do you need to do a Fetch on a single instance of ParaView running in AWS lambda?

I wanted to saying First line takes 4s!
hmm…
I don’t have any idea can fetch data… So, I did Fetch on single instance in AWS lambda…
Do you have any better idea?

The 4s is most likely related on how your lambda is setup which makes the paraview library loading very slow. There is nothing that we can do from our side unless you use some kind of singularity image which may speed things up.

For your fetch question, yes many solutions. But we just need to understand what you aim to do rather than solving the wrong problem.

I am making CFD Tool as Saas. So, if upload a mesh file, I try to visualize it, but the speed of visualizing is too slow.

Do you have a GPU for remote rendering?

No only frontend web browser, use ec2 and lambda

So you are using an osmesa version of Paraview and rely on vtk.js for doing the local rendering.

Oh, I will try it. thank you for your kindness!