CPU profiling via micro -profile shows that among the CPU time consumed by micro, a large fraction of time is usually spent in Go map accesses, e.g. in runtime.mapaccess1_faststr() and runtime.mapaccess2_faststr().
Most probably most of those map accesses are accesses to a buffer's Settings map. Micro's code, including such frequently called parts as displayBuffer(), is full of things like if b.Settings["diffgutter"].(bool). If we convert all those map accesses to simple struct field accesses (e.g. b.diffgutter), it should work much faster. (And we may still keep the map representation as well, e.g. for compatibility with plugins, just not use it inside micro itself all the time.)
Commit hash: 828871a
OS: any
Terminal: any