Skip to content

disable some unused code + reduce the size of some structures - #79

Merged
Frenzie merged 4 commits into
koreader:masterfrom
benoit-pierre:pr/trim_the_fat
Oct 4, 2026
Merged

Frenzie merged 4 commits into
koreader:masterfrom
benoit-pierre:pr/trim_the_fat

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented Oct 4, 2026 •

Copy link
Copy Markdown
Member
▸ rm -rf build && cmake -S lib -B build -G Ninja -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug
▸ ninja -C build
▸ gdb --batch -ex 'set trace-commands' -ex 'print sizeof (WILLUSBITMAP)' -ex 'print sizeof (KOPTContext)' build/libk2pdfopt.so

# Before:
+symbol-file build/libk2pdfopt.so
+print sizeof (WILLUSBITMAP)
$1 = 3104
+print sizeof (KOPTContext)
$2 = 6456

# After:
+symbol-file build/libk2pdfopt.so
+print sizeof (WILLUSBITMAP)
$1 = 800 # ÷3.9
+print sizeof (KOPTContext)
$2 = 1848 # ÷3.5

This change is Reviewable

@benoit-pierre

Copy link
Copy Markdown
Member Author

Added 7971711 for posterity.

@Frenzie
Frenzie merged commit 878e9ad into koreader:master Oct 4, 2026
0 of 2 checks passed
@benoit-pierre
benoit-pierre deleted the pr/trim_the_fat branch October 4, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants