Reducing code-size for web version

Aperta
#165 3 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, sqlite, wasm

Direzione di ricerca

Start by reviewing the browser compilation configuration and how Emscripten includes canvas, SDL audio, requestAnimationFrame, filesystem, TTY, and _sysconf in the minified output. Determine which compilation options can exclude unused code, then verify that the browser build remains functional with a reduced minified size.

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

Descrizione

Currently even the minified version is a whopping 2.04 MB which is a rather heavy even when gzipped. Looking through the code, I noticed that Emscripten's canvas, SDL audio and requestAnimationFrame are included in the minified output, which are obviously not used by SQLite.

When compiling only for browser, ENVIRONMENT_IS_NODE and ENVIRONMENT_IS_SHELL would be false and could be dead-code eliminated. Also, the filesystem and TTY also takes out a substantial chunk of code which could be unnecessary. _sysconf is also ever called with 30 so it could be aggressively inlined.

I wonder if there are options to set which could reduce the code size?

Lingua principale
JavaScript
Stelle
13.7k
Fork
1.1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

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 sql-js/sql.js

Tutte le issue di sql-js/sql.js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.