This is a gist with a set of helpful performance tricks and best practices that I've found on the internet.
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {isArray} = Array; | |
const sync = async values => { | |
for (let {length} = values, i = 0; i < length; i++) { | |
const value = await values[i]; | |
values[i] = isArray(value) ? await sync(value) : value; | |
} | |
return values; | |
}; |