Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler: reduce memory consumption #1516

Merged
merged 5 commits into from Oct 16, 2023
Merged

Compiler: reduce memory consumption #1516

merged 5 commits into from Oct 16, 2023

Conversation

hhugo
Copy link
Member

@hhugo hhugo commented Oct 15, 2023

fix #1444

@hhugo
Copy link
Member Author

hhugo commented Oct 15, 2023

@phated, can you try this one ?

@phated
Copy link
Contributor

phated commented Oct 15, 2023

On my local computer, this has reduced the memory of each JSOO execution to 2.6gb 🎉 I've updated grain-lang/grain#1909 to test out some runs against CI runners.

@phated
Copy link
Contributor

phated commented Oct 15, 2023

@hhugo did something else change in JSOO that would make the execution of our tests extremely slow? Ubuntu has been running for almost 2 hours and they usually complete in 3 minutes with v5.0.1

@hhugo
Copy link
Member Author

hhugo commented Oct 16, 2023

@hhugo did something else change in JSOO that would make the execution of our tests extremely slow? Ubuntu has been running for almost 2 hours and they usually complete in 3 minutes with v5.0.1

We'd need to investigate, here are two changes probably affecting the runtime profile.

@hhugo
Copy link
Member Author

hhugo commented Oct 16, 2023

@phated, the jsoo flag --disable use-js-string seems to fix the issue.

@hhugo
Copy link
Member Author

hhugo commented Oct 16, 2023

I would be nice to understand what's the problematic pattern though

@hhugo hhugo merged commit e075fca into master Oct 16, 2023
15 checks passed
@hhugo hhugo deleted the size2 branch October 16, 2023 14:37
@hhugo
Copy link
Member Author

hhugo commented Oct 16, 2023

@hhugo, I'm looking a the grain CI and now wonder if I messed my testing (and conclusion) up

hhugo pushed a commit to hhugo/opam-repository that referenced this pull request Dec 4, 2023
CHANGES:

## Features/Changes
* Compiler: global dead code elimination (Micah Cantor, ocsigen/js_of_ocaml#1503)
* Compiler: change control-flow compilation strategy (ocsigen/js_of_ocaml#1496)
* Compiler: loop no longer absorb the whole continuation
* Compiler: Dead code elimination of unused references (ocsigen/js_of_ocaml#2076)
* Compiler: reduce memory consumption (ocsigen/js_of_ocaml#1516)
* Compiler: support for import and export construct in the js parser/printer
* Lib: add download attribute to anchor element
* Misc: switch CI to OCaml 5.1
* Misc: preliminary support for OCaml 5.2
* Misc: support for OCaml 5.1.1

## Bug fixes
* Runtime: fix Dom_html.onIE (ocsigen/js_of_ocaml#1493)
* Runtime: add conversion functions + strict equality for compatibility with Wasm_of_ocaml (ocsigen/js_of_ocaml#1492)
* Runtime: Dynlink should be able to find symbols in jsoo_runtime ocsigen/js_of_ocaml#1517
* Runtime: fix Unix.lstat, Unix.LargeFile.lstat (ocsigen/js_of_ocaml#1519)
* Compiler: fix global flow analysis (ocsigen/js_of_ocaml#1494)
* Compiler: fix js parser/printer wrt async functions (ocsigen/js_of_ocaml#1515)
* Compiler: fix free variables pass wrt parameters' default value (ocsigen/js_of_ocaml#1521)
* Compiler: fix free variables for classes
* Compiler: fix internal invariant (continuation)
* Compiler: fix variable renaming for let, const and classes
* Lib: Url.Current.set_fragment need not any urlencode (ocsigen/js_of_ocaml#1497)
mseri pushed a commit to ocaml/opam-repository that referenced this pull request Dec 6, 2023
CHANGES:

## Features/Changes
* Compiler: global dead code elimination (Micah Cantor, ocsigen/js_of_ocaml#1503)
* Compiler: change control-flow compilation strategy (ocsigen/js_of_ocaml#1496)
* Compiler: loop no longer absorb the whole continuation
* Compiler: Dead code elimination of unused references (ocsigen/js_of_ocaml#2076)
* Compiler: reduce memory consumption (ocsigen/js_of_ocaml#1516)
* Compiler: support for import and export construct in the js parser/printer
* Lib: add download attribute to anchor element
* Misc: switch CI to OCaml 5.1
* Misc: preliminary support for OCaml 5.2
* Misc: support for OCaml 5.1.1

## Bug fixes
* Runtime: fix Dom_html.onIE (ocsigen/js_of_ocaml#1493)
* Runtime: add conversion functions + strict equality for compatibility with Wasm_of_ocaml (ocsigen/js_of_ocaml#1492)
* Runtime: Dynlink should be able to find symbols in jsoo_runtime ocsigen/js_of_ocaml#1517
* Runtime: fix Unix.lstat, Unix.LargeFile.lstat (ocsigen/js_of_ocaml#1519)
* Compiler: fix global flow analysis (ocsigen/js_of_ocaml#1494)
* Compiler: fix js parser/printer wrt async functions (ocsigen/js_of_ocaml#1515)
* Compiler: fix free variables pass wrt parameters' default value (ocsigen/js_of_ocaml#1521)
* Compiler: fix free variables for classes
* Compiler: fix internal invariant (continuation)
* Compiler: fix variable renaming for let, const and classes
* Lib: Url.Current.set_fragment need not any urlencode (ocsigen/js_of_ocaml#1497)
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.

[BUG] Latest master takes up too much memory and fails with Fatal error: out of memory
2 participants