Analyse performance / profile Android System? Why is the system slow?
If you truly want to dive into the slowness issues of your Android device you can use the Android SDK and developer tools to analyze what the device is doing exactly, but that's not for the average Android user.
Something I found out just recently is that the Battery Optimization functionality on my Nexus 5X was really slowing the system down to the point of becoming unusable.
I manually disabled this feature for each and every App and OS element and that made a huge  difference.
And I haven't experienced any obvious battery drainage since.
If you want to try this, the steps are described here