To find the cause of a "long running script" that slows your computer down, you can use the following approaches:
- Use Performance Tools: In Microsoft Edge, you can take a recording in the Performance tool to identify any long
Evaluate Scriptevents. This will help you pinpoint where the script is taking too long to execute. - Collect JavaScript CPU Profiles: If you notice performance issues, consider collecting a JavaScript CPU profile. This profile will show you where runtime is spent within the functions of your page, helping you identify inefficient scripts.
- Review Common JavaScript Problems: Look for common issues that might be affecting your script's performance, such as:
- Expensive input handlers that affect response or animation.
- Badly timed JavaScript that affects load and response times.
- Long-running JavaScript that stalls events like
DOMContentLoaded. - Garbage collection issues due to inefficient scripts.
By analyzing these areas, you can identify and address the specific causes of the long running script that is affecting your computer's performance.
References: