Skip to content
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

Adds babel caching for system.js. #8364

Merged
merged 1 commit into from
May 3, 2017

Conversation

yurydelendik
Copy link
Contributor

Makes developer viewer loading faster.

@yurydelendik
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2017

From: Bot.io (Linux)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://107.21.233.14:8877/cd573f76509e4e0/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2017

From: Bot.io (Windows)


Received

Command cmd_test from @yurydelendik received. Current queue size: 1

Live output at: http://54.215.176.217:8877/955924f01f74495/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2017

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/955924f01f74495/output.txt

Total script time: 21.01 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll test this properly after a good night's sleep, but for now just two quick comments based on skimming through the code.

*/
var babel = require('plugin-babel');

var cacheExpiration = 30 /* min */ * 60 * 1000;
Copy link
Collaborator

@Snuffleupagus Snuffleupagus May 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the runtime on the Linux bot is already >30 minutes, and that PR #8284 will make the tests slightly slower, would it perhaps make sense to use 60 minutes instead to avoid cache invalidation during test runs?

dbPromise = new Promise(function (resolve, reject) {
var request = indexedDB.open(dbName, dbVersion);
request.onupgradeneeded = function() {
var db = request.result;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Too much indentation here, and in the two methods just below.

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2017

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/cd573f76509e4e0/output.txt

Total script time: 60.00 mins

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2017

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/714cbbde8b8d8ae/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2017

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/1f50148b27e06a1/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2017

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/1f50148b27e06a1/output.txt

Total script time: 20.82 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented May 3, 2017

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/714cbbde8b8d8ae/output.txt

Total script time: 32.95 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://107.21.233.14:8877/714cbbde8b8d8ae/reftest-analyzer.html#web=eq.log

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this successfully locally, both with the current master and also together with PR #8284.

This works great in my testing, so thank you for implementing this!

@Snuffleupagus Snuffleupagus merged commit b4787f0 into mozilla:master May 3, 2017
evadne added a commit to evadne/pdf.js that referenced this pull request May 6, 2017
- checks for crypto.webkitSubtle in addition to crypto.subtle
- fixes a problem where the viewer no longer loads in development mode on Safari
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
evadne added a commit to evadne/pdf.js that referenced this pull request May 7, 2017
…n Safari

- the viewer no longer loads in development mode on Safari
- this is due to Safari having crypto.webkitSubtle instead of crypto.subtle
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.
evadne added a commit to evadne/pdf.js that referenced this pull request May 7, 2017
…n Safari

- the viewer was not loading in development mode on Safari, due to Safari
  having crypto.webkitSubtle instead of crypto.subtle.

- the isCachingPossible check was amended to check for crypro.subtle
  which is currently not in Safari but in Firefox and Chrome. This
  essentially works around the issue by disabling caching for Safari
  in development mode.

- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.

- mozilla#8387 (comment)
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
evadne added a commit to evadne/pdf.js that referenced this pull request May 7, 2017
…n Safari

- the viewer was not loading in development mode on Safari, due to Safari
  having crypto.webkitSubtle instead of crypto.subtle.

- the isCachingPossible check was amended to check for crypro.subtle
  which is currently not in Safari but in Firefox and Chrome. This
  essentially works around the issue by disabling caching for Safari
  in development mode.

- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.

- note: at time of writing Safari Version 10.1 (12603.1.30.0.34) has an
  issue where caching can be enabled for PDF.js but must to be disabled for
  worker, otherwise the two sides do not communicate.

- mozilla#8387 (comment)
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
evadne added a commit to evadne/pdf.js that referenced this pull request May 7, 2017
…n Safari

- the viewer was not loading in development mode on Safari, due to Safari
  having crypto.webkitSubtle instead of crypto.subtle.

- the isCachingPossible check was amended to check for crypro.subtle
  which is currently not in Safari but in Firefox and Chrome. This
  essentially works around the issue by disabling caching for Safari
  in development mode.

- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.

- note: at time of writing Safari Version 10.1 (12603.1.30.0.34) has an
  issue where caching can be enabled for PDF.js but must to be disabled for
  worker, otherwise the two sides do not communicate.

- mozilla#8387 (comment)
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
yurydelendik added a commit that referenced this pull request May 7, 2017
amends Babel cache (#8364) implementation to also work on Safari
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…n Safari

- the viewer was not loading in development mode on Safari, due to Safari
  having crypto.webkitSubtle instead of crypto.subtle.

- the isCachingPossible check was amended to check for crypro.subtle
  which is currently not in Safari but in Firefox and Chrome. This
  essentially works around the issue by disabling caching for Safari
  in development mode.

- maintainer sentiment: people who develop on Safari can get this speedup
  once Safari drops prefix for SubtleCrypto.

- note: at time of writing Safari Version 10.1 (12603.1.30.0.34) has an
  issue where caching can be enabled for PDF.js but must to be disabled for
  worker, otherwise the two sides do not communicate.

- mozilla#8387 (comment)
- https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…crypto

amends Babel cache (mozilla#8364) implementation to also work on Safari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants