Profile and reduce Oxide code-image startup, peak RSS, and package size
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 44/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- rust
- Domaine
- performance
Piste de recherche
Start with the remaining initialization work: examine object, closure, and cell allocation and capped-heap accounting, then compare the identified Hero script-turn cost with QJBC. Use the existing Hero replay and report changes against the recorded instruction counts; image decoding and instantiation are also named areas to measure. The issue sets a separate rollout gate: record identical Tab5 release package results against the device QJBC ABI and exercise packaged workers before changing the default engine.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Baseline
Stock PocketJS Hero, Linux x86-64, same release replay host, same bundle and assets, 20 boot-only samples per engine in ABBA order.
| Metric | Oxide OXBC v2 | QuickJS QJBC (NG 0.16.2) |
|---|---|---|
| Boot median | 10.76 ms | 6.33 ms |
| Median process peak RSS | 10,776 KiB | 8,046 KiB |
| UI bytecode section | 480,993 B | 148,909 B |
The compiler-free Oxide host matched QJBC for all 360 replay frames, the ordered host-call trace, and the final framebuffer.
Work
- Account for bytecode bytes by section and attribute startup instructions and allocation peaks across package admission, realm and host setup, decode, relocation/publication, instantiation, and first execution.
- Land and measure the first round of improvements to the dominant costs. Recheck the same Hero replay, format rejection before execution, no-draw boot, process peak RSS, UI bytecode bytes and the engine Sweep.
- Validate the rollout on Tab5 with the release ESP-IDF QuickJS QJBC ABI and exercise the PocketJS worker path. Record that evidence before changing the default engine.
First optimization round
The paired rerun used Linux CPU 2, the same original Hero bundle and assets, and 20 boot-only samples per arm. QJBC ran through the existing PocketJS C guest.
| Metric | OXBC v2 | OXBC v3 | QuickJS QJBC |
|---|---|---|---|
| Boot median | 10.85 ms | 9.00 ms | 6.34 ms |
| Median boot peak RSS | 10,728 KiB | 9,628 KiB | 8,092 KiB |
| UI bytecode section | 480,993 B | 289,412 B | 148,909 B |
- Fixed-width instructions and position tables accounted for 79.8% of OXBC v2. V3 uses variable-width immediates and delta-coded source positions and preserves backtraces.
- Massif attributed 1,034,592 bytes to an eager copy of the asset pak. When the native registry has mounted assets, the guest creates the private
__pakbuffer on first access. Massif's sampled live allocation peak dropped from 5,667,338 to 4,441,015 bytes. - Loading now validates the relocated tree's input once and uses its explicit tree links for instantiation. Callgrind attributed 17.68M instructions to v2 loading and 12.37M to v3 loading.
- The capped heap skips growth calculations for arenas with zero requested records. The capacity-check work dropped from 11.55M to 10.25M instructions at the same 19,228 checks. One collection ran on the profiled boot.
- The compiler-free host still matched QJBC for 360 frames, the host operation log and the final pixels. The release build rejects v2 before effects, and a v3 exception after a host operation stops startup. The instruction and loop-size Sweep gates passed after refreshing linker symbol ordering. The 37-workload engine peak-RSS geometric mean was 0.998×.
Remaining
- Reduce the initialization cost. Hero's Oxide script turn accounts for 42.00M instructions compared with 28.52M in QJBC's script execution. Examine object, closure and cell allocation and capped-heap accounting. Image decoding and instantiation still account for 7.72M and 4.65M instructions respectively.
- Measure identical Tab5 release packages against the device QJBC ABI and exercise packaged workers. The Linux QJBC results above are for the native diagnostic ABI.
- Langage dominant
- Rust
- Étoiles
- 61
- Forks
- 2
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Nous n'avons pas encore vérifié les fichiers d'installation de ce projet. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de pocket-stack/quickjs-oxide
-
performance.now() bypasses Host and uses std::time::Instant (unsupported on wasm32-unknown-unknown)Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
pocket-stack/quickjs-oxide#165 · 1 commentaire ·
-
Two public SystemHost types: the core one is always UTC, the host crate's uses the system time zoneOuverteenhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
pocket-stack/quickjs-oxide#164 ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 56/100
pocket-stack/quickjs-oxide#163 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
pocket-stack/quickjs-oxide#158 · 1 commentaire ·
-
Execution slow paths: inline-cache misses (Gameboy), typed-array access (zlib), array stores (Sieve)Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
pocket-stack/quickjs-oxide#157 ·
Toutes les issues de pocket-stack/quickjs-oxide
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Wait for the IDS correction dialog to settle in the stale-audit testPeut-être pris @louistrue l’a pris aujourd’hui. Ouverteready
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
dutchman-cad/dutchman#874 ·
Les mainteneurs répondent en général sous 1 jour
-
The address-wrap test for a path that fits a line fails on a machine without Inter installedOuvertebug good first issue ready
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
MartinPTielemans/ilo#3840 ·
Les mainteneurs répondent en général sous 1 jour
-
bug file-compat priority: medium
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
storytold/wordcraft#7248 · 1 commentaire ·
Les mainteneurs répondent en général sous 4 jours