admin管理员组

文章数量:1124409

I have a library with an exported function. The function is performance intensive (0.1ms per execution). I have been calling this function from the imported library, continuously on many charts for many years.

Recently. I took the function from the library, and pasted it into a new indicator. When running it from there, I was surprised to see that it takes 0.5ms per execution to run.

Both the library and local function are running with the exact same settings, charts, number of executions, etc. etc. (I've tried with different settings, and on different charts, etc. same result).

What could possibly cause this? The only thing that I can think of is that because my function is fairly heavy, and called very often, that over the years I've been running it, trading view have optimised it (or allocated extra resources to it) on their infrastructure.... resulting in the DRAMATIC (5x) performance difference to when I run the identical code locally.

Is that a thing? Thoughts? Gurus?

I have a library with an exported function. The function is performance intensive (0.1ms per execution). I have been calling this function from the imported library, continuously on many charts for many years.

Recently. I took the function from the library, and pasted it into a new indicator. When running it from there, I was surprised to see that it takes 0.5ms per execution to run.

Both the library and local function are running with the exact same settings, charts, number of executions, etc. etc. (I've tried with different settings, and on different charts, etc. same result).

What could possibly cause this? The only thing that I can think of is that because my function is fairly heavy, and called very often, that over the years I've been running it, trading view have optimised it (or allocated extra resources to it) on their infrastructure.... resulting in the DRAMATIC (5x) performance difference to when I run the identical code locally.

Is that a thing? Thoughts? Gurus?

Share Improve this question asked yesterday mrsnuffymrsnuffy 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

Can you help us to understand the resource fingerprint of your pine code? As the same number of cycles are used locally and remotely, the natural place to look is how large is the resource pool when executing remotely vs locally on a resource where your code has a high dependency.

本文标签: