# SaveScreenshot in pvpython/pvbatch takes significantly longer than GUI when StreamTracer is used

**URL:** https://discourse.paraview.org/t/savescreenshot-in-pvpython-pvbatch-takes-significantly-longer-than-gui-when-streamtracer-is-used/4126
**Category:** ParaView Support
**Created:** [April 20, 2020, 10:25pm UTC](https://discourse.paraview.org/t/savescreenshot-in-pvpython-pvbatch-takes-significantly-longer-than-gui-when-streamtracer-is-used/4126 "2020-04-20T22:25:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dwesley](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/5e9695/32.png) [@dwesley](https://discourse.paraview.org/u/dwesley)
#### Post date: [April 20, 2020, 10:25pm UTC](https://discourse.paraview.org/t/savescreenshot-in-pvpython-pvbatch-takes-significantly-longer-than-gui-when-streamtracer-is-used/4126/1 "2020-04-20T22:25:24Z")

</div>

I have a large amount of CFD results that I want to save images of. There are two types of images: surface pressures alone and surface pressures with streamlines (created with Calculator and StreamTracer). When I use pvpython/pvbatch with a script to save a screenshot, the streamline images take significantly longer to save than the non-streamline images (about 6 minutes vs about 5 seconds). Weirdly this is even slower than if I would go into the Paraview GUI, load the state, then save a screenshot manually (takes probably 1 minute from opening the GUI to saved image).

I’ve played around with the different SaveScreenshot options but have had no luck in shortening the amount of time it takes. Here’s a the macro I’m using to save.

NOTE: I’m positive the difference is solely due to the SaveScreenshot command. If I remove the SaveScreenshot command there is barely any time difference between rendering views with/without streamlines.

* * *

```
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()

# load state
LoadState('STATE_FILE', DataDirectory='CFD_DATA')

# find view
renderView1 = FindViewOrCreate('RenderView1', viewtype='RenderView')

# set active view
SetActiveView(renderView1)

# save screenshot
SaveScreenshot('PICSAVEPICNAME.png', renderView1, ImageResolution=[1280, 960],
    TransparentBackground=1)
```
