# how to make “reset()” more effective

**URL:** https://discourse.vtk.org/t/how-to-make-reset-more-effective/7997
**Category:** Support
**Created:** [March 7, 2022, 6:59am UTC](https://discourse.vtk.org/t/how-to-make-reset-more-effective/7997 "2022-03-07T06:59:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Clifford](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/c/e56c9b/32.png) [@Clifford](https://discourse.vtk.org/u/Clifford)
#### Post date: [March 7, 2022, 6:59am UTC](https://discourse.vtk.org/t/how-to-make-reset-more-effective/7997/1 "2022-03-07T06:59:12Z")

</div>

Here’s the part of my code:

```auto
def anim():
        
        ms = pts.mlab_source
        
        for i in range(490):
            scalars = X_minMax[:,i+1]
            print(i)
            ms.reset(scalars=scalars)
            pts.module_manager.source.save_output('./results/output'+str(i)+'.vtk')
            yield

```

When I run it in local, it runs effectively, however, when I use django running this code,

ms.reset(scalars=scalars)

this sentence will take a long time, and I don’t know what happens, is there a way to replace it or make it quicker?

thanks for your answer!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [March 7, 2022, 10:00am UTC](https://discourse.vtk.org/t/how-to-make-reset-more-effective/7997/2 "2022-03-07T10:00:31Z")

</div>

> [@Clifford](#):
>
> `mlab_source`

So looks like a mayavi question, accord to [GitHub - enthought/mayavi: 3D visualization of scientific data in Python](https://github.com/enthought/mayavi), you could:

> If you have questions you could ask on the [Mayavi-users mailing list](https://sourceforge.net/p/mayavi/mailman/mayavi-users/). This is used by some folks and is not too active. Another mailing list that may be of use is the [ETS Users mailing list](https://groups.google.com/forum/#!forum/ets-users). This is a more general list where a lot of folks experienced with the Enthought Tool Suite are available.
