Parsing application.js takes 280ms
This is because we load all javascript on every page load.
From Slack convo:
15:25]
Josh Frye JS can/should be extracted to specific controller js files and loaded only for that controller. Application js should be shared stuff
[15:25]
Jacob Schatz Right now everything is loaded into Application JS and loaded in it’s entirety on each page. I agree that we should be loading what we need on each page.
[15:26]
Yorick Peterse @jacobvosmaer: inlining JS won't help
[15:26]
Jacob Schatz Inlining isn’t the answer
[15:26]
Jacob Vosmaer sounds like a good idea to me (but I don't know much about this stuff)
[15:26]
Yorick Peterse also application.js should be cached
[15:27]
make sure your console doesn't disable caching (which it does by default when opened)
[15:27]
Jacob Vosmaer inlining humongous application.js won't help, no
[15:27]
@yorickpeterse: I am looking at the parsing
[15:27]
how does browser caching prevent the browser parsing the js?
[15:28]
Yorick Peterse Chrome might cache the resulting bytecode, not sure what they do these days
[15:28]
(and then just not touch the raw JS until it changes)
[15:28]
Jacob Vosmaer _loading_ application.js gets cached just fine
cc @dzaporozhets @sytses @yorickpeterse @jacobvosmaer @jschatz1 @joshfng