Failed to execute Action "Script": Unable to complete execution because CPU limit of 1000 ms exceeded

I run a script and I get:

Failed to execute Action “Script”: Unable to complete execution because CPU limit of 1000 ms exceeded

Is there a way to get more runtime? Here is the script:

I figure out that it’s because I have a regex test for strings containing unicode characters. In particular /đ\b/ doesn’t match đ. To solve this I replace /đ\b/ with /đ(?=$|\P{L})/u. But this runs very slow. At the end of the day I use this workaround:

input = input + ' '
var regex = new RegExp(word + ' ', 'gi');
const test = regex.test(input)

However I’m still interested to know the answer of the question in the title.

Hello.
I get 404 from the link above, so I cannot check your script :frowning:

We have some cpu+time limits on user scripts. CPU limits are calculated by getting metrics from process stat file for sandboxed subprocess, that is created for your script execution.
We have those limits in for order user script not be able to consume too much of resources.
General advice is to try optimize your script to consume less resources.
We may change limits if some basic tasks won’t be able to complete, but at the moment it is not the case.

Here is the correct file: https://github.com/QuaCau-TheSphere/CA-quan-ly-tai-chinh-bang-tieng-Viet-tu-nhien/blob/4f947d5a583a0f464fb576be78fe87601f59e6de/Quản%20lý%20tài%20chính%20bằng%20tiếng%20Việt%20tự%20nhiên%20trên%20Fibery.js

I understand the concern of limited resource, but why not extend it in the paid plan?