-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Move worker-thread only functions from src/shared/util.js
and into a new src/core/core_utils.js
file
#10577
Conversation
…ils.js` This file (currently) contains not only DOM-specific helper functions/classes, but is used generally for various helper code relevant for main-thread functionality.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/61035b57e82f4d2/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/0dd6987ba153d62/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/61035b57e82f4d2/output.txt Total script time: 17.98 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/0dd6987ba153d62/output.txt Total script time: 25.76 mins
|
9f92455
to
f7a61e2
Compare
…a new `src/core/core_utils.js` file The `src/shared/util.js` file is being bundled into both the `pdf.js` and `pdf.worker.js` files, meaning that its code is by definition duplicated. Some main-thread only utility functions have already been moved to a separate `src/display/display_utils.js` file, and this patch simply extends that concept to utility functions which are used *only* on the worker-thread. Note in particular the `getInheritableProperty` function, which expects a `Dict` as input and thus *cannot* possibly ever be used on the main-thread.
f7a61e2
to
3a09a2f
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2804ae401e7cd21/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2804ae401e7cd21/output.txt Total script time: 1.98 mins Published |
Splitting the utilities seems like a good idea to me. Thanks! |
The
src/shared/util.js
file is being bundled into both thepdf.js
andpdf.worker.js
files, meaning that its code is by definition duplicated.Some main-thread only utility functions have already been moved to a separate
src/display_utils.js
file, and this patch simply extends that concept to utility functions which are used only on the worker-thread.Note in particular the
getInheritableProperty
function, which expects aDict
as input and thus cannot possibly ever be used on the main-thread.