-
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
Miscellaneous (small) improvements in src/core/annotation.js
#12552
Conversation
/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/e3a75e86eb6df08/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/e3a75e86eb6df08/output.txt Total script time: 24.95 mins
Image differences available at: http://54.67.70.0:8877/e3a75e86eb6df08/reftest-analyzer.html#web=eq.log |
…unused arguments As can be seen in `src/core/fonts.js`, this method only accepts *one* parameter, hence it's somewhat difficult to understand what the Annotation-code is actually attempting to do here. The only possible explanation that I can imagine, is that the intention was initially to call `Font.charToGlyph` *directly* instead. However, note that that'd would not actually have been correct, since that'd ignore one level of font-caching (see `this.charsCache`). Hence the unused arguments are removed, in `src/core/annotation.js`, and the `Font.charToGlyph` method is now marked as "private" as intended.
…esent Rather than returning an *empty* Object[1] we should be returning `null` instead, since that's consistent with existing API-functionality. To avoid having to *manually* track if the Object is empty, this patch also introduces a small helper function to check its size.
…ally (PR 12543 follow-up) Given that the `Map`-pattern apparently has undesirable performance characteristics, change this getter back to using an Object instead and check its size before returning it.
3334ea8
to
fdb6520
Compare
/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/0ec557fd0fdd768/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/3e52b7097d0209a/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/0ec557fd0fdd768/output.txt Total script time: 24.80 mins
Image differences available at: http://54.67.70.0:8877/0ec557fd0fdd768/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/3e52b7097d0209a/output.txt Total script time: 27.16 mins
Image differences available at: http://3.101.106.178:8877/3e52b7097d0209a/reftest-analyzer.html#web=eq.log |
Looks good! |
Please refer to the individual commit messages for additional details.