I had the same problem; I tracked it down to a problem with my particular macOS user account most likely caused by me changing the home directory name post-facto. (https://support.apple.com/en-au/HT201548) I made the change because I didn't want my full name as the account name. The problem didn't present itself prior to (IIRC) updating to macOS Sierra.
To determine whether this is the cause for your particular problem, create a fresh new macOS user account, log into it and see if you can replicate the slow-down there. If there's no slowdown, it's probably this bug.
To work around the problem, I created a temporary admin account and logged into it. I then renamed my current account, created a new one with the correct details, then transferred most of my stuff from the old account to the new one, including the full contents of Library. Last step, chown the new profile directory:
I was only able to hypothesise the cause, as that happened to correlate well in my minuscule sample size; your data point appears to have invalidated that. I regret not being able to isolate the cause properly.
I would still run the user account experiment — your described symptom matches exactly what I experienced. It should only take a few minutes to make an account, log into it and run Firefox.
What I do know:
* The problem started after a major macOS version upgrade, almost certainly Sierra.
* The problem occurred on my desktop and my laptop, but not my wife's computers that saw largely similar install history but more plain-vanilla usage patterns.
* The contents of the Firefox profile directory do not matter; the problem occurs with a completely fresh profile.
* The contents of the ~/Library directory do not seem to matter; creating a new user account and moving the entire contents of ~/Library back fixed it.
* The problem could not be replicated within any other user accounts on the same machine where the problem occurred.
To determine whether this is the cause for your particular problem, create a fresh new macOS user account, log into it and see if you can replicate the slow-down there. If there's no slowdown, it's probably this bug.
To work around the problem, I created a temporary admin account and logged into it. I then renamed my current account, created a new one with the correct details, then transferred most of my stuff from the old account to the new one, including the full contents of Library. Last step, chown the new profile directory: