Giter VIP home page Giter VIP logo

Comments (2)

VederJay avatar VederJay commented on July 22, 2024

That error doesn't say much - check your browser console (in Chrome: press F12, click tab Console) and see what the output is. My guess is, it will be:
Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, or (2) set Module.TOTAL_MEMORY before the program runs.

I'm having the same issue with a rather large graph I'm trying to display. I'll let you know if I find how to set the TOTAL_MEMORY higher so it runs.

from viz-js.

VederJay avatar VederJay commented on July 22, 2024

Ok, not pretty - I was hoping to be able to set the TOTAL_MEMORY separately in JavaScript so that it would get picked up, but I'm not seeing how to do that.
Dirty hack: open viz.js, search for the line:
ha=e.TOTAL_MEMORY||16777216,da=4096;da<ha||da<2hc;)da=16777216>da?2da:da+16777216;

This seems to limit the process to 16 MB memory usage. (16MB = 16 * 1024 *1024 bytes = 16777216 bytes). Increase the number (three times in the above line) to get more memory available. I've needed to go up to 256 MB, which - eventually - displayed my graph. It took a few minutes to appear though.

Btw if you go really high you'll need to increase other memory limits as well, like the TOTAL_STACK (which is in viz.js just before the above referenced line). It will give you a clear error when you run into these type of limits though.

from viz-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.