# Speed up Pulse Engine Actions

**URL:** https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234
**Category:** Pulse Physiology Engine
**Created:** [February 29, 2024, 10:26am UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234 "2024-02-29T10:26:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ehtisham\_Yasin](https://discourse.kitware.com/user_avatar/discourse.kitware.com/ehtisham_yasin/32/842_2.png) [@Ehtisham\_Yasin](https://discourse.kitware.com/u/Ehtisham_Yasin)
#### Post date: [February 29, 2024, 10:26am UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234/1 "2024-02-29T10:26:32Z")

</div>

Right now what I’m planning to do is to increase/decrease the OxygenSaturation from 1 to 0.5 and vice versa. Usually it takes around 2 minutes to reach the desired value. Is there any way to reduce that time to around 30 seconds or any manual timeframe?

---

<div class="post-metadata">

### Author: ![Ehtisham\_Yasin](https://discourse.kitware.com/user_avatar/discourse.kitware.com/ehtisham_yasin/32/842_2.png) [@Ehtisham\_Yasin](https://discourse.kitware.com/u/Ehtisham_Yasin)
#### Post date: [March 4, 2024, 12:10pm UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234/2 "2024-03-04T12:10:37Z")

</div>

Update: I found an Implementation named **AdvanceTime\_s** in **PulseUnityEngine** in **PulseEngineDriver**. It does works as it should be, but it freezes the game for around 1-2 mins If I want to skip around 15 Minutes (900 seconds).  
I believe what is actually happening is that it tries to do all those necessary calculations in between the time, which being performance-intensive freezes the application, until those calculations are done.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [March 4, 2024, 12:30pm UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234/3 "2024-03-04T12:30:06Z")

</div>

Yes,that is correct.  
Pulse simulate the body at 50Hz, so all those time steps need to be calculated when you advance time.

If you want to do large time jumps, you could prepare a state file that you can load to simulate large time jumps like that.

---

<div class="post-metadata">

### Author: ![Ehtisham\_Yasin](https://discourse.kitware.com/user_avatar/discourse.kitware.com/ehtisham_yasin/32/842_2.png) [@Ehtisham\_Yasin](https://discourse.kitware.com/u/Ehtisham_Yasin)
#### Post date: [March 4, 2024, 12:38pm UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234/4 "2024-03-04T12:38:35Z")

</div>

Okay got that. So is there any guide on how I can set up a state file for that?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [March 4, 2024, 12:56pm UTC](https://discourse.kitware.com/t/speed-up-pulse-engine-actions/1234/5 "2024-03-04T12:56:30Z")

</div>

We suggest you use the **[Pulse Explorer](https://gitlab.kitware.com/physiology/explorer/-/wikis/home#download-the-pulse-explorer)** to setup a patient and use a Serialization action to write your state file to disk. Then you can load that file in your application.

You could also do it procedurally [with the Api](https://gitlab.kitware.com/physiology/engine/-/blob/stable/src/csharp/howto/HowTo_CreateState.cs?ref_type=heads) too.
