DDMAL / DDMAL/meix.js

Optimizing xmllint.js

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4
Forks
4
PR merge metrics
No merged PRs in 30d

Description

This is an ongoing thing I'll fool around with over time.

I originally had `emcc -O2 -s ASM_JS=0 -s SAFE_HEAP=1 libxml2-2.2.7.8/xmllint.o libxml2-2.7.8/.libs/libxml2.a libz.a -o xmllintTest.js --pre-js pre.js` as the most efficient, but I lost some data in splitting the repos up, this doesn't work, and I can't retrace what's breaking it.

Current record for functioning and lowest size is: `emcc -O1 --minify 1 -s ASM_JS=0 -s SAFE_HEAP=1 libxml2-2.7.8/xmllint.o libxml2-2.7.8/.libs/libxml2.a libz.a -o xmllint.raw.js --pre-js pre.js` at 7445895 bytes.

Notes:
- Closure: needs sudo to run, thought it was working earlier but is now compiling the Math.\* functions which causes them to not work
- minify: helps a lot
- ASM_JS: can not be used, causes issues with assertions/print-outs
- SAFE_HEAP: may not be necessary but helped

ALWAYS TAKE THE MOST RECENT CHANGES FROM THE REPO HEADER

Put in a wiki page at https://github.com/DDMAL/meix.js/wiki/Optimizing-xmllint.js to describe this as well.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.