# Evaluator function call caused high CPU usage

**URL:** <https://resource.dopus.com/t/evaluator-function-call-caused-high-cpu-usage/60727>\
**Category:** Help & Support\
**Tags:** script, evaluator\
**Created:** [October 19, 2026, 7:40am UTC](https://resource.dopus.com/t/evaluator-function-call-caused-high-cpu-usage/60727 "2026-10-19T07:40:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxp](https://resource.dopus.com/user_avatar/resource.dopus.com/lxp/32/33734_2.png) [@lxp](https://resource.dopus.com/u/lxp)\
**Post date:** [October 19, 2026, 7:40am UTC](https://resource.dopus.com/t/evaluator-function-call-caused-high-cpu-usage/60727/1 "2026-10-19T07:40:38Z")

</div>

While playing with the new evaluator functions, I noticed code execution would stop after a function call.

No errors, no crashes, but after looking for a bug a bit Opus used 60% of my CPU. Exiting Opus brought everything back to normal, and it never happened again.

I ran the code from an open button while editing.

I've mailed the memory dumps.

 ![2026-10-18 - 21.49.02 - Task_Manager](https://resource.dopus.com/uploads/default/original/3X/3/8/38b1f634ad6fc54a156f01612d923a2358122704.png)

 ![2026-10-18 - 21.48.37 - Task_Manager_-_Directory_Opus](https://resource.dopus.com/uploads/default/original/3X/4/0/404076ed6a1dc891bf0f79606974909e7d50d4c3.png)

The code snippet:

```javascript
Output(selpath);
tabToActivate = FindTabIndex(selpath);

// execution stopped here

Output("tabToActivate: " + tabToActivate);

if (tabToActivate == -1) {
	cmd = "Go PATH=""" + selpath + """";
} else {
	cmd = "Go TABSELECT=" + tabToActivate;
}

Output(cmd);

function FindTabIndex(thePath){
	Output("thePath: " + thePath);
    for (i = 0; i < tabcount; i++) {
		Output(i + " | " + TabPath(i));
        if (TabPath(i) == thePath) return i;
    }
    return -1;
}

```
