Closed Bug 944785 Opened 8 years ago Closed 7 years ago

Move popcorn-js into bower

Categories

(Webmaker Graveyard :: Popcorn Maker, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: michiel, Assigned: jon)

References

Details

Attachments

(2 files)

by using a git module for popcorn-js, we're tacking on about 100Mb worth of checkout, of which we only use a few hundred KB. Especially the sequence sub-submodule is hurting us, costing 80MB in transfer but never getting used.

If we can figure out exactly what we're using from the popcorn-js repo, we might be able to create a more streamlined branch for it, and then make use of that instead.
We definitely have always needed to just strip out that dumb sequence module so that's something that just should be done period.

It probably isn't a bad idea to keep a stripped down branch for Popcorn Maker but we definitely need to prune out the sequence module. We still get questions about that on the mailing list periodically.
Assignee: nobody → jon
Status: NEW → ASSIGNED
Bower? I'm in favour of that. Otherwise, removing any cruft in the repo should probably happen anyway. We can start we removing the old sequencer submodule, and go from there.
Removing the sequencer module is a good first step, so blocking this on bug 968885
Depends on: 968885
Summary: un-git-module popcorn-js → Move popcorn-js into bower
This is a two-part patch. The first part cleans up our require.js config, the second part actually moved popcorn into a bower module.
Attachment #8376629 - Flags: review?(scott)
Attachment #8376629 - Flags: review?(schranz.m)
Comment on attachment 8376629 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/458

How much space do we save on this?

Comments.
Attachment #8376629 - Flags: review?(scott) → review-
Depends on: 973366
There are several options here. First of all, stats:

* A full clone of popcorn-js is 75.15 MiB of bandwidth. On-disk is 88MB. This is also how large it is when you update the submodule in popcorn maker now.
* A shallow clone of popcorn-js is 9.55MiB of bandwith. On-disk is 22MB. 
* A bower install of popcorn-js v1.5.2 without ignoring files is 9.5MB of bandwidth. On-disk is 12MB.
* A bower install of popcorn-js v1.5.3 with ignoring files is 9.5MB of bandwidth. On-disk is 1MB.
* A custom upload of popcorn-js v1.5.2 is 43KB. On-disk is 193KB. You can see it at https://github.com/mozilla/popcorn-js/releases/tag/v1.5.2 . It only contains popcorn.js, ie8/, modules/, players/, and wrappers/.

I think it makes sense to go with a bower package just based on the size savings. If we want to save even more we can go with the additions to Makefile that I did and upload a custom binary.

The size benefits of this patch do need to be weighed against making updating popcorn.js a little more involved. I did some testing and it looks like you can simple delete the popcorn-js bower module and replace it with a git clone, so I don't think it'll be too difficult to switch to that workflow.
Attachment #8376629 - Flags: review- → review?(scott)
Attachment #8376629 - Flags: review?(schranz.m) → review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.