You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/usage/performance-profiling.md
+1-43
Original file line number
Diff line number
Diff line change
@@ -55,51 +55,9 @@ The profiling output shows:
55
55
-**Absolute times**: The total elapsed time since the start of the process
56
56
-**Relative times** (in parentheses): The time taken by each specific step
57
57
58
-
## Key Performance Metrics
59
-
60
-
The most important metrics to watch are:
61
-
62
-
1.**Module initialization**: Time to load and initialize Node.js modules
63
-
2.**After imports**: Time to complete all JavaScript imports
64
-
3.**After yargs setup**: Time to set up the command-line interface
65
-
4.**Total startup time**: Overall time from start to when MyCoder is ready to run
66
-
67
-
## Diagnosing Performance Issues
68
-
69
-
If you notice slow startup times, here are some common causes and solutions:
70
-
71
-
### Slow Module Loading
72
-
73
-
If "Module initialization" or "After imports" takes a long time:
74
-
- Check for slow disk I/O
75
-
- Consider using an SSD if you're on a mechanical hard drive
76
-
- Verify you're not running many background processes
77
-
78
-
### Slow Command-Line Parsing
79
-
80
-
If "After yargs setup" takes a long time:
81
-
- Check if you have many environment variables
82
-
- Verify your shell initialization files aren't slowing things down
83
-
84
-
### Operating System Differences
85
-
86
-
Performance can vary significantly between operating systems:
87
-
- Windows may be slower due to different filesystem performance
88
-
- WSL (Windows Subsystem for Linux) may have overhead
89
-
- macOS with Apple Silicon tends to be fastest for Node.js applications
90
-
91
-
## Improving Performance
92
-
93
-
Some tips for improving MyCoder's startup performance:
94
-
95
-
1.**Use Node.js 20+**: Later versions of Node.js have better startup performance
96
-
2.**Minimize environment variables**: Having many environment variables can slow down process startup
97
-
3.**SSD storage**: Using an SSD can significantly improve module loading times
98
-
4.**Clean npm cache**: Occasionally run `npm cache clean --force` to clear cached packages
99
-
100
58
## Reporting Performance Issues
101
59
102
-
If you encounter significant performance problems that profiling doesn't help resolve, please report them on our [Discord server](https://discord.gg/5K6TYrHGHt) with:
60
+
If you encounter significant performance problems, please report them on our [Discord server](https://discord.gg/5K6TYrHGHt) with:
0 commit comments