how can i improve script execution time Is it there a control or something to assign more resources to script execution. Or the only option is to improve script's code performance?.
If blender freezes while script execution, you should check performance using build-in modules.

In some cases you can cache function return using functools.lru_cache.

The one way to get more resources is using multiprocessing.