docs/dev/PERFORMANCE.md
We mainly rely on Chrome's Performance tab to analyse and record the performance of MarkText
Electron is split into 3 processes: main, preload and renderer. We will be focusing on main and renderer since these are the heaviest
main processpnpm run perf:inspect-brk
This launches a production build of Marktext that has a break-point before the first line of Javascript is ran
A debugger at port 5858 is also attached
Go to chrome://inspect
Press Configure, and add localhost:5858
Press "Inspect" on the entry that appears below (might take a while)
When Developers Tools first launches, you will notice the breakpoint that is set
Simply go to Performance, press Record, and wait for MarkText to launch fully, then Stop the recording
inspectpnpm run perf:inspect
rendererpnpm run start
This launches a production build of MarkText as well
Press F12 to open Dev Tools and press Reload and Record to benchmark start-up render performance