vanniktech/gradle-dependency-graph-generator-plugin

Allow increase in memory to accommodate larger modules

Grimoren opened this issue · 7 comments

It seems there is an upper limit to how many objects can be graphed:

Encountered this issue on a rather larger application with deeply nested dependencies.
Cannot enlarge memory arrays. Either
// (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216,
// (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations,
// (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or
// (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0

I created a naive fix by setting a high upper bound.

See nidi3/graphviz-java#12 for more info.

@vanniktech can we merge this? This library is not usefull without this fix for us, it fails on our project.

Just for reference: This MR allow you to set an upper limit too:

#183

So I think this can be closed @vanniktech

Sure we can close it. Just need an example how to do set this.

Yeah, i was trying it but cant use release "latest" and its not in release "0.8.0" yet.

Cann we add it to the docs and create a new release?

This would be very useful for our project too. Some info in the README and a new release would be much appreciated. Many thanks.

Using the 0.9.0-SNAPSHOT still has the same memory error FYI.
Defaulting it to more memory is probably a good idea...this is on a project with only 200ish modules FYI. I've seen projects with 1000+ modules so this is smallish nowadays.