Skip to content

Load d3 only when necessary

username-removed-386624 requested to merge cs-unnecessary-assets into master

Now d3 is only loaded on the users' show page and the graphs pages, where it's necessary.

Redo of !3993 (closed).

This decreases page size from 4.6MB to 4.3MB for a given Activity page (before compression), or a savings of 300KB. This is essentially a proof of concept for removing larger dependencies such as the Ace Editor, Chart.js, and Raphael, which will likely provide another 1MB of savings on most pages (again, before compression).

cc: @lbennett @jschatz1 @alfredo1

Merge request reports