-
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
Replace css color rgb(...) by #... #12555
Conversation
calixteman
commented
Oct 30, 2020
•
edited
Loading
edited
- it's faster to generate the color code in using a table for components
- it's very likely a way faster to parse (when setting the color in the canvas)
Interesting find; should the cases in /~https://github.com/mozilla/pdf.js/blob/master/src/display/svg.js be converted as well and possibly the |
/botio-linux 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/bf51015794c5981/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/bf51015794c5981/output.txt Total script time: 24.93 mins
Image differences available at: http://54.67.70.0:8877/bf51015794c5981/reftest-analyzer.html#web=eq.log |
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.
Looks good, but this really needs a benchmark since this code is called very often and the question is what the effect of this change is; see /~https://github.com/mozilla/pdf.js/wiki/Benchmarking-your-changes for how to do that, and make sure to use different PDF files from the test/pdf
folder for good coverage (especially image-heavy ones or other files that trigger this utility function often).
I ran benchmarks with this file:
|
Good improvement! If you push the fix for the comment above and re-run the benchmark with that fix applied, I'll also trigger the tests here. |
* it's faster to generate the color code in using a table for components * it's very likely a way faster to parse (when setting the color in the canvas)
I already ran the benchmark with the template string. |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/35fe18a84d7ba8e/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/ff8eee58c5ba6d1/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/35fe18a84d7ba8e/output.txt Total script time: 25.07 mins
Image differences available at: http://54.67.70.0:8877/35fe18a84d7ba8e/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/ff8eee58c5ba6d1/output.txt Total script time: 29.46 mins
Image differences available at: http://3.101.106.178:8877/ff8eee58c5ba6d1/reftest-analyzer.html#web=eq.log |
Looks good! /botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/d3ce496d078d237/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 1 Live output at: http://3.101.106.178:8877/8e97dfbedf68794/output.txt |
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/8e97dfbedf68794/output.txt Total script time: 26.83 mins
|
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/d3ce496d078d237/output.txt Total script time: 60.00 mins
|
/botio-linux makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/3333c796a6c1372/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/3333c796a6c1372/output.txt Total script time: 23.99 mins
|
just for information see also this https://stackoverflow.com/a/55200387 that also approve the idea to make a pre created table for performance. |