2

I'm seeing some very slow performance in my JS code in an electron app

I am trying to performance profile my application but the term that comes up is "Run console task"

I have attached a picture of an example trace

I suspect that there is poor performance in the JS code itself, but it is completely unable to be inspected because of this "Run console task" which is inscrutible

For reference I am using [email protected] and just clicking "Performance" in the devtools

enter image description here

2
  • 1
    Tracing back from the chromium sources, it seems it's to handle V8 calls from github.com/v8/v8/blob/7e5b37c9b523916ac67760b72028580b36339ecc/… Not sure in what circumstances this would be hit though... Commented Apr 23 at 1:55
  • thanks for digging into this for me @Kaiido, i don't have a handle on the issue yet but it could be a clue Commented Apr 25 at 13:56

1 Answer 1

1

Chrome added a console.createTask API that frameworks can use to annotate their task scheduling for better stack traces in Chrome DevTools.

The only odd thing in your case is that there are no additional JavaScript frames on top of the "Run console task". I suggest consulting the framework you are using in your electron app and/or check if JavaScript sampling is enabled when collecting performance profiles.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.