ozansz / gls

Minimal file manager with terminal UI #Go

Home Page:https://sazak.io/gls-file-manager-on-terminal-with-go/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

profile gls binary with pprof to spot bottlenecks in runtime

ozansz opened this issue · comments

Summary

Folder indexing (tree traversal) seems to be inefficient than it should be, considering it's basically a tree traversal algorithm.
Use pprof tool to find out if there are any bottlenecks in the code, by either:

  1. Writing a benchmark test and running it with the -benchmem, -memprofile, and -cpuprofile options
  2. Setting up a pprof server by using net/http/pprof, and calling it during runtime to capture the CPU/memory dumps