View Single Post
Old 08-21-2020, 02:55 PM   #11
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,864
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by droopy View Post
What differences in performance is there between
enabling both
1. Don't uppercase header/footer text
and
2. Custom header/footer page number text
individually

VERSUS

enabling
Don't uppercase header/footer text and change page number text
?
Spoiler:

Don't uppercase header/footer text:
- Enabled: no
- Description: Prevents the text in the reader header/footer from being uppercased.
- PatchGroup: Header/footer page number text
# Replace QString::toUpper call with QString::trimmed (to copy the string, and
# not need to add a mov instruction and NOP the destructor):
- ReplaceBytes:
Base: "ReadingView::getChapterTitle()"
Offset: 282
FindInstBLX: {SymPLT: "QString::toUpper() const"}
ReplaceInstBLX: {SymPLT: "QString::trimmed() const"}
- ReplaceBytes:
Base: "ReadingView::updateFooter()"
Offset: 26
FindInstBLX: {SymPLT: "QString::toUpper() const"}
ReplaceInstBLX: {SymPLT: "QString::trimmed() const"}
# Page number text:
- FindReplaceString: {Find: "%1 OF %2", Replace: "%1 of %2"}
# Percent read text (this string is only used by ReadingView::getChapterPercentProgressText,
# and the home screen one is already lowercase):
- FindReplaceString: {Find: "%1% READ", Replace: "%1% read"}

Custom header/footer page number text:
- Enabled: no
- PatchGroup: Header/footer page number text
- Description: Changes the page number text format in the reading header & footer
- FindReplaceString: {Find: "%1 OF %2", Replace: "%1 / %2"}

Don't uppercase header/footer text and change page number text:
- Enabled: yes
- Description: Combines the previous two patches.
- PatchGroup: Header/footer page number text
- ReplaceBytes:
Base: "ReadingView::getChapterTitle()"
Offset: 282
FindInstBLX: {SymPLT: "QString::toUpper() const"}
ReplaceInstBLX: {SymPLT: "QString::trimmed() const"}
- ReplaceBytes:
Base: "ReadingView::updateFooter()"
Offset: 26
FindInstBLX: {SymPLT: "QString::toUpper() const"}
ReplaceInstBLX: {SymPLT: "QString::trimmed() const"}
- FindReplaceString: {Find: "%1 OF %2", Replace: "%1 / %2"}
- FindReplaceString: {Find: "%1% READ", Replace: "%1% read"}
Both the separate patches are in case you only want one of them. The combined patch enables both. You could enable both the separate patches and not the combined for the same thing.

There is no performance difference no matter which way you go.
JSWolf is offline   Reply With Quote