-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perf: Save 597 gz bytes through code sharing #637
Conversation
@@ -2,22 +2,9 @@ | |||
* @file resolve-url.js - Handling how URLs are resolved and manipulated | |||
*/ | |||
|
|||
import URLToolkit from 'url-toolkit'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does URLToolkit need to be a direct dep of VHS anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually isn't anymore, just a dev dependency, as it's used in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, cool, missed that it was moved over.
I wonder if there could be any issues with the stream.js compat across the libs. They mostly look the same but there's some minor changes. |
stream.js only had one difference between aes-decrypter, m3u8-parser, and mux.js and it was actually a bug that was fixed in Mux.js. https://github.com/videojs/vhs-utils/blob/master/src/stream.js#L51 |
FYI, tests are failing. Also, we'd want to make sure that the deps get non-prerelease releases before we merge this. |
986bad6
to
8cd081f
Compare
14938b3
to
f9242c1
Compare
bb017cd
to
847aef4
Compare
dc0d8b1
to
b9c1b62
Compare
b9c1b62
to
5d70af5
Compare
const player = this.player; | ||
// TODO: why does this make the next test | ||
// throw an "The operation was aborted." on firefox | ||
if (!videojs.browser.IS_FIREFOX) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefox 69 started throwing an error "The Operation was aborted", and no amount of promise silencing seems to help. The test itself actually passes, but it throws an error that causes a global failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens in master too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should instead use QUnit.skip
? Maybe QUnit[videojs.browser.IS_FIREFOX ? 'skip' : testFn]
?
function(assert) { | ||
const done = assert.async(); | ||
let appendsFinished = 0; | ||
if (!videojs.browser.IS_EDGE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing intermittently on edge, even in master, since edge throws on setDuration sometimes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about skipping here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, changes look fine. I had a couple questions about skipping tests in a different way that avoids the large indent changes. Feel free to ignore. :)
const player = this.player; | ||
// TODO: why does this make the next test | ||
// throw an "The operation was aborted." on firefox | ||
if (!videojs.browser.IS_FIREFOX) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should instead use QUnit.skip
? Maybe QUnit[videojs.browser.IS_FIREFOX ? 'skip' : testFn]
?
function(assert) { | ||
const done = assert.async(); | ||
let appendsFinished = 0; | ||
if (!videojs.browser.IS_EDGE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about skipping here.
Description
74033
->72945
We inline 4-5
@babel/runtime
helpers, 4 differentStream
classes,3
base 64 to uin8array functions, and two resolve urls (which each includes their own version of url-toolkit.). This full request removes all the duplicate code and moves it to@videojs/vhs-utils
. It also updatesvideojs-generate-rollup-config
to deal with sharing@babel/runtime
helpers.Depends on the following generator and small code updates:
Chore/use vhs utils mux.js#295Closes #640
Closes #641