In order to prevent buggy sites from freezing my system I imposed a CPU Quota limit of 95%, a Memory High of 2G and a Memory Max of 3G on my Firefox flatpak as described by the flatpak documentation.
$ cat .config/systemd/user/app-flatpak-org.mozilla.firefox-.scope.d/override.conf
[Scope]
CPUQuota=95%
MemoryHigh=2G
MemoryMax=3G
However after applying the changes I noticed that the browser became rather laggy. Reading again the systemd resource control documentation, it seems to be somewhat ambiguous over how CPUQuota is applied, namely, it says that
The percentage specifies how much CPU time the unit shall get at maximum, relative to the total CPU time available on one CPU
I don't understand if the "total CPU time available on one CPU" is the CPU time of a single core, or the total CPU time of all (usually one) system processors. And if it is the former, then why would Firefox start lagging?
Note that Firefox's about:memory reports only 800MB~ of used memory at the root process, so I am tempted to discard the memory limits as the cause.