Closed leodemoura closed 9 years ago
Hi @leodemoura ,
I've added a URL option mem
. Please try: http://www.cs.cmu.edu/~soonhok/lean.js/?mem=32
It will run lean.js with 32MB memory. On my machine, it process Jakob's file in 3 seconds without memory error.
Later, we will add a "settings" icon where we can customize many options.
I tried it and it didn't work for me. I still get the error
-- Processing file ...
Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.
-- Failed to write to 'Dropbox/Apps/Lean.JS/input.lean'.
Do I have to flush the cache?
On my machine, it process Jakob's file in 3 seconds without memory error.
It seems the js version is 10x slower than the native one. It takes 0.3secs to process his file using native lean.
It is working now. I don't know why. I closed/opened chrome, and it didn't work. I tried again with ?mem=64
, and it worked. Then, I tried again with ?mem=32
and it worked ?!?!?
For the record, I guess what happened is that the web-browser cached js/main.js
and used the old one. As a result, it didn't pick up the newly introduced option mem
.
When I try to process Jakob's file on the web, I get the following error message:
Here is his file