-
Create an app using the following instructions: https://gist.github.com/nataliemarleny/78fb26ac874a013b7fce4dc0c80eee8f
-
Downloaded all JS files from "Chrome Dev-tools > Sources":
-
Count number of lines
createElement
appears in:
grep createElement *.js | wc -l
Result: 41
- Count number of occurrences
createElement
appears in:
grep -o createElement *.js | wc -l
Result: 97
Size in bytes: 97 B * 13 = 1261 B
- Size of the files downloaded
du -sh
du -sb
Size: 1.7 MB = 1693030 B
createElement
takes up:
node -p -e '(97 * 13) / 1693030 * 100'
0.07% of the entire size
Repeated all steps
- Count of lines containing
createElement
: 32 - Count of
createElement
occurrences: 2290 - Size of all files: 1707595 B = 1.8M
- Percentage of all files: (2290 * 13) / 1707595 * 100 = 1.74%