-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Simplify the newRefs
computation in the "SaveDocument"-handler in the worker-thread
#15062
Conversation
9315afa
to
bdf0a4b
Compare
…he worker-thread - Let the `Page.save`-method filter out "empty" entries, similar to the `Page._parsedAnnotations`-getter, since that on its own already simplifies the "SaveDocument"-handler a tiny bit. - The existing `reduce` and `concat` construction isn't exactly a wonder of readability :-) Thanks to modern JavaScript features it should be possible to replace all of this with `Array.prototype.flat()` instead, which at least to me feels a lot easier to understand.
bdf0a4b
to
57c10ac
Compare
/botio unittest |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/67c7a2527858c82/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/902be9136a16e58/output.txt |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.241.84.105:8877/b1d9c09925208e0/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.193.163.58:8877/49cc67eb3d51d3e/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/902be9136a16e58/output.txt Total script time: 3.27 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/67c7a2527858c82/output.txt Total script time: 6.11 mins
|
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/b1d9c09925208e0/output.txt Total script time: 4.70 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/49cc67eb3d51d3e/output.txt Total script time: 7.55 mins
|
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.
LGTM. Thank you.
Let the
Page.save
-method filter out "empty" entries, similar to thePage._parsedAnnotations
-getter, since that on its own already simplifies the "SaveDocument"-handler a tiny bit.The existing
reduce
andconcat
construction isn't exactly a wonder of readability :-)Thanks to modern JavaScript features it should be possible to replace all of this with
Array.prototype.flat()
instead, which at least to me feels a lot easier to understand.