7 ms·
What’s a profiler and how do I start using one? If they’re language specific, then for typescript, Ruby, and Kotlin.
by bigEnotation 3y ago
What’s a profiler and how do I start using one?
If they’re language specific, then for typescript, Ruby, and Kotlin.
- spion 3y agoFor TypeScript (browser, chrome), it should be in the devtools under the Performance tab, (backend) is node --prof and --prof-process
- gleenn 3y agoruby-prof for Ruby and VisualVM or the profiler built into IntelliJ are all pretty good.
- recursivecaveat 3y agoTo answer your first question: its software to monitor the execution of a program and produce a mapping from resource usage (usually time-spent) to the source code. This is useful to find the most expensive portions of your application so you can concentrate improvements on them. How exactly to use one would be language-specific, but the general flow is just to loop profiling and addressing problematic code until you're happy with the results. Just gut-checking which exact parts of a program are slow is really hard without prior profiling or very detailed logging (which is a kind of profiling), so they're very important to guide efforts.