Better understanding library size

Aperta
#969 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, rust, sqlite

Direzione di ricerca

Inizia riproducendo le misurazioni delle dimensioni del binario Android per la revisione master corrente e la build con i client rimossi. Analizza il contributo di rusqlite e della relativa libreria SQLite integrata, insieme al codice client menzionato nell’issue. Il lavoro è completato quando i principali contributi alle dimensioni e le potenziali aree di riduzione sono stati identificati con dati sulle dimensioni a supporto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've been thinking about how to reduce binary sizes for the libraries, mostly as I am looking forward to adding more clients to the lib, for example the RPC client, the Electrum Streaming Client, and Floresta.

In an attempt to better understand which part of the codebase is contributing to the binary size, I started by removing what I considered was probably the biggest culprits, the clients (partially because they ship with the whole http stack). The data surprised me a little bit.

Current lib size on master (2946cc1) for Android binaries
 14M    arm64-v8a/libbdkffi.so
9.9M    armeabi-v7a/libbdkffi.so
 13M    x86_64/libbdkffi.so
Lib size if you remove all clients (Android binaries)
9.5M    arm64-v8a/libbdkffi.so
7.0M    armeabi-v7a/libbdkffi.so
8.8M    x86_64/libbdkffi.so

Mmmm....

Ok so the above is not quite what I was expecting. Take for example the most important of those, the arm64-v8a. From 14 to 9.5 MB? I was hoping to cut it down by much more.

It turns out that at least for Android, a big part of what's in this 9.5MB binary is the SQLite libary that is shipped wholesale with rusqlite (need more exact size data on this).

I'm not done the investigation on this, but I had enough to open the issue. More to come.

Lingua principale
Rust
Stelle
127
Fork
81
Merge medio
1g 2h
PR unite (30g)
5

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bitcoindevkit/bdk-ffi

Tutte le issue di bitcoindevkit/bdk-ffi

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.