# How to Check the Load/Performance Impact of Project Library Scripts on the Ignition Gateway?

**URL:** <https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [May 19, 2026, 12:20pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596 "2026-05-19T12:20:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 19, 2026, 12:20pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/1 "2026-05-19T12:20:01Z")

</div>

I have a script called Stale in project library now I want to monitor the script on gateway.

How Can I Measure How Much Load My Scripts Are Putting on the Gateway?

Best Way to Monitor Script Execution Load in Ignition Gateway.

Methods to Check Script Performance and Gateway Usage in Ignition.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a074bdf11f3ccf30b757139b2cdcda6083ead8c3.png)

---

<div class="post-metadata">

**Author:** ![travisaggiebrown](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/travisaggiebrown/32/85824_2.png) [@travisaggiebrown](https://forum.inductiveautomation.com/u/travisaggiebrown)\
**Post date:** [May 19, 2026, 2:47pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/2 "2026-05-19T14:47:24Z")

</div>

on the gateway if you go to the diagnostics tab there should be a tab called scripts where you should be able to see some additional information on the running scripts. there is also a spot to check gateway CPU usage in the overview of the diagnostics tab.

you could also use a logger to help track the script [system.util.getLogger | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.3/appendix/scripting-functions/system-util/system-util-getLogger)

if you're looking to check script performance you could use this \/

> [@Wisdom from performance testing Ignition](https://forum.inductiveautomation.com/t/wisdom-from-performance-testing-ignition/114769/15):
>
> In jython, use java's `System.nanoTime()` call to obtain cross-CPU synchronized clock nanoseconds. This call is specifically designed for performance tracking.
> 
> In Ignition's expression language, consider using my Integration Toolkit's `nanoTime()` and/or `timeMe()` expression functions.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 19, 2026, 3:09pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/3 "2026-05-19T15:09:04Z")

</div>

Get rid of that `import system`, you should never import libraries from within a function, only within the module itself. Importing libraries within functions causes unnecessary performance impacts. However, you should never import the _ **system** _ library itself. This is \*always available (except under certain circumstances pre v8.3)

Re the OP, you can check timer and other gateway event scripts execution stats from the Web portal. This function doesn't look like it's doing much though

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 19, 2026, 7:08pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/4 "2026-05-19T19:08:28Z")

</div>

> [@nminchin](#):
>
> you should never import the _ **system** _ library itself

Note: there is a difference between ignition's `system` library, and the Java `System` library, as used in Phil's post.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 4:11am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/5 "2026-05-20T04:11:22Z")

</div>

Ok Thanks a lot.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 4:11am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/6 "2026-05-20T04:11:39Z")

</div>

Ok Thanks a ton!!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 20, 2026, 6:29am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/7 "2026-05-20T06:29:39Z")

</div>

I actually just noticed a function in a project that was importing 5 libraries inside the function.

I timed the execution of the function (it does some recursive calls in it) both with and without the imports, and it's a bit crazy:

- With imports: 250ms
- Without imports: 40ms

And this is a function called on a reasonably short period and as part of another function's code, so not the only thing happening. 210ms is a lot of time and resources that I can retrieve!

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 6:50am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/8 "2026-05-20T06:50:31Z")

</div>

Thanks for notifying my mistake, will do changes immediately, Thanks for helping me.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 20, 2026, 11:30am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/9 "2026-05-20T11:30:12Z")

</div>

To check for a stale value, the full qualified value can be read instead of just the value in your script to see when it last changed without having to store these values and timestamps in your globals. The only difference is if the value changes at all (you're ignoring anything smaller than 2 decimals) it will record it as a change.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 20, 2026, 11:50am UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/10 "2026-05-20T11:50:17Z")

</div>

> [@nminchin](#):
>
> 210ms is a lot of time and resources that I can retrieve!

The code paths are complex, but in my study of jython's import code, I couldn't find a path where the `import` statement, in any form, **doesn't** take the system-wide import lock. Using the import statement in hot code paths will destroy performance. It should never be used **inside** a `def` of any kind.

---

<div class="post-metadata">

**Author:** ![tgarrison](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tgarrison/32/80965_2.png) [@tgarrison](https://forum.inductiveautomation.com/u/tgarrison)\
**Post date:** [May 20, 2026, 4:11pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/11 "2026-05-20T16:11:49Z")

</div>

Question - is it worth (is it even possible) to have a single gateway script that does all the imports that you need, so they're only imported in one place? Or are all the imports specific to a script?

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 4:22pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/12 "2026-05-20T16:22:35Z")

</div>

I am using this on MQTT engine Value tag and timestamp, in such a way that if the value of tag is same for 5 min(in production environment) and if timestamp is same for more than 2 min then it will show stale otherwise it will show fresh data.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 4:23pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/13 "2026-05-20T16:23:04Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 20, 2026, 4:47pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/14 "2026-05-20T16:47:18Z")

</div>

> [@tgarrison](#):
>
> Or are all the imports specific to a script?

Imports only apply to the script scope in which they are called. They cannot be delegated.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 20, 2026, 4:48pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/15 "2026-05-20T16:48:39Z")

</div>

> [@prasoon](#):
>
> timestamp is same for more than 2 min

Keep in mind that Ignition will discard new timestamps when the value is good and unchanged.

---

<div class="post-metadata">

**Author:** ![prasoon](https://avatars.discourse-cdn.com/v4/letter/p/ecb155/32.png) [@prasoon](https://forum.inductiveautomation.com/u/prasoon)\
**Post date:** [May 20, 2026, 4:59pm UTC](https://forum.inductiveautomation.com/t/how-to-check-the-load-performance-impact-of-project-library-scripts-on-the-ignition-gateway/115596/16 "2026-05-20T16:59:02Z")

</div>

No I mean timestamp tag (MQTT Engine) not the timestamp of value.
