# About paraview module import latency and fetch function execution latency

**URL:** https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192
**Category:** Web Support
**Tags:** python
**Created:** [August 25, 2022, 7:19am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192 "2022-08-25T07:19:40Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 25, 2022, 7:19am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/1 "2022-08-25T07:19:41Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [August 25, 2022, 4:04pm UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/2 "2022-08-25T16:04:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 26, 2022, 12:17am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/3 "2022-08-26T00:17:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 26, 2022, 12:23am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/4 "2022-08-26T00:23:06Z")

</div>

![스크린샷 2022-08-26 오전 9.22.19](https://discourse.paraview.org/uploads/default/original/2X/2/2c327d56316e36fea469a3f9e693180a2881554a.png)  
 ![스크린샷 2022-08-26 오전 9.22.00](https://discourse.paraview.org/uploads/default/original/2X/d/d87699b4837b1d926ad1971812a75b151ad511a7.png)

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

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [August 26, 2022, 2:11pm UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/5 "2022-08-26T14:11:22Z")

</div>

Are you saying

```python
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?

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 29, 2022, 1:21am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/6 "2022-08-29T01:21:00Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [August 29, 2022, 4:44pm UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/7 "2022-08-29T16:44:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 30, 2022, 1:06am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/8 "2022-08-30T01:06:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [August 30, 2022, 2:26pm UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/9 "2022-08-30T14:26:13Z")

</div>

Do you have a GPU for remote rendering?

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [August 31, 2022, 3:22am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/10 "2022-08-31T03:22:23Z")

</div>

No only frontend web browser, use ec2 and lambda

---

<div class="post-metadata">

### Author: ![jourdain](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jourdain/32/11_2.png) [@jourdain](https://discourse.paraview.org/u/jourdain)
#### Post date: [August 31, 2022, 3:01pm UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/11 "2022-08-31T15:01:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![James1](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@James1](https://discourse.paraview.org/u/James1)
#### Post date: [September 1, 2022, 12:34am UTC](https://discourse.paraview.org/t/about-paraview-module-import-latency-and-fetch-function-execution-latency/10192/12 "2022-09-01T00:34:21Z")

</div>

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