Hot answers tagged

29 votes
Accepted

How do I disable the stack tracing feature in Mathematica 11?

Is there a possibility to disable stack tracing, but keep messages? Internal`$MessageMenu = False reverts back to the old messages. Seems to do the trick and ...
ktm's user avatar
  • 4,231
27 votes
Accepted

What happens if you don't Reap what you've Sown?

Preamble This complements the answer of Roman with a few more details. Reap - Sow implementation is based on an internal object <...
Leonid Shifrin's user avatar
26 votes

How do I disable the stack tracing feature in Mathematica 11?

Analysis current as of Mathematica version 11.0.1 and 11.1.0. We can disable the Show Stack Trace item in the new message menu as follows: ...
WReach's user avatar
  • 68.4k
23 votes

What would you ask Mathematica to do on a big system?

I've always wondered about the scalability of MathLink (now officially "Wolfram Symbolic Transfer Protocol"). This is the protocol used by Mathematica to communicate between the front end and the ...
Oleksandr R.'s user avatar
  • 22.9k
22 votes

Is there any harm or benefit to Removing unneeded private symbols in packages?

I decided to take one of my large packages and Remove all symbols in the Private` context that have no definitions attached to them ... And is there any risk if only those symbols that are not used ...
rm -rf's user avatar
  • 88.4k
21 votes
Accepted

Computing elements of a 1000 x 60 matrix exhausts RAM

Your function F is implemented really, really inefficiently. By quite simple means and in the proposed situation, it can be sped up by a factor of 20000. The key is ...
Henrik Schumacher's user avatar
21 votes

What happens if you don't Reap what you've Sown?

It looks like there's no memory being used by Sow when there is no encompassing Reap. With ...
Roman's user avatar
  • 46.2k
19 votes
Accepted

Generating and rendering extremely large graphs

I suggest not to use Graph to render, as it is slow. Instead, compute the vertex coordinates, then render manually. The rough steps are as follows: Create an "...
Szabolcs's user avatar
  • 233k
19 votes
Accepted

Out of memory when computing a coefficient of a large symmetric polynomial

Split it into 3 steps to get result immediately. ...
Akku14's user avatar
  • 17.2k
18 votes
Accepted

SquaresR memory leak?

Cause Under the hood System`SquaresR is still calling functions in the context NumberTheory`. Partial output of: ...
Mr.Wizard's user avatar
  • 270k
15 votes

What would you ask Mathematica to do on a big system?

I am sure you can easily install also Linux on it and then you could contact Vladyslav Shtabovenko, the current maintainer of FeynCalc (https://github.com/vsht) and ask him about hard problems in High ...
Rolf Mertig's user avatar
  • 17.1k
15 votes
Accepted

How to force Mathematica to clean up the cache

This is also not an answer (I think you found the culprit and it needs to be solved by WRI) but a suggestion for a workaround. The idea is to run the memory leaking code in an extra kernel and restart ...
Albert Retey's user avatar
  • 23.5k
14 votes

Is this buggy behavoir of Module solved?

IMHO, this is not a bug, but a feature. It allows you to implement pointer-like data structures with garbage collection because symbols in a Module have the ...
Henrik Schumacher's user avatar
13 votes

Memory leak in the system function: how to free memory without restarting the kernel?

Please report this to support. You can get rid of some of the memory leak by executing the following: ...
Carl Woll's user avatar
  • 130k
13 votes
Accepted

Efficient storage of large non-rectangular arrays

Special case Best way would be to not store this thing at all. It has so much structure that a[[i,j]] is cheaply computable on the fly. Integer and double ...
Henrik Schumacher's user avatar
12 votes

On making a graphical real-time memory usage monitor

As a Palette 1) Using ListLinePlot: ...
Karsten7's user avatar
  • 27.4k
12 votes
Accepted

Garbage collection for lexical closures

Here's an approach to "automate" the usage of the ExpressionCleanup` paclet mentioned by @LeonidShifrin. The idea is to return an object from your module ...
Lukas Lang's user avatar
  • 33.5k
12 votes
Accepted

Memory leak with Mathematica Graph functions

Here is another possible way to eliminate the impact of history, etc. The following code aborts on my machine after printing to the console three times. ...
Victor K.'s user avatar
  • 5,116
11 votes

What would you ask Mathematica to do on a big system?

4 TB memory? N-body of course; ...
Baran Cimen's user avatar
  • 1,184
11 votes

What would you ask Mathematica to do on a big system?

I would choose a problem that exploits the unique power of Mathematica, in particular the natural functions involving graph theory, symbolic math, graphics, and the high compute power you have ...
David G. Stork's user avatar
11 votes
Accepted

Is there any harm or benefit to Removing unneeded private symbols in packages?

As a more direct answer to the question of memory we can check with a test. ...
Mr.Wizard's user avatar
  • 270k
11 votes
Accepted

Memory leak with FindMaximum/Minimum inside of Module

Please report this as a bug. A minimal example: ...
Carl Woll's user avatar
  • 130k
11 votes

Garbage collection for lexical closures

If you can afford this from performance standpoint, you can generate definitions at every function call: ...
Leonid Shifrin's user avatar
10 votes

Is this memory leak in VertexDelete a bug?

I can reproduce the problem. A more minimal example is ...
Szabolcs's user avatar
  • 233k
10 votes
Accepted

PackedArray and Dot results in undesired unpacking

Is it important to do the computation with integers? I have no problem computing this with reals (using N): ...
Anton Antonov's user avatar
10 votes

How to force Mathematica to clean up the cache

Not an answer, just extended clarification There seem to be many types of caching related leaks here. I can get one by just doing this: ...
b3m2a1's user avatar
  • 46.6k
10 votes
Accepted

How to solve this problem 710 of Project-Euler

"when I use the above method to solve t(42), I am prompted that the memory is insufficient. How can I avoid memory overflow errors?" ...
kglr's user avatar
  • 384k
10 votes
Accepted

huge difference in memory usage

Yes, the reason for the greater memory use is that your attemptOne generates the entire set of subsets before performing the summation. Keep in mind that those are ...
MassDefect's user avatar
  • 10.1k
10 votes

huge difference in memory usage

Yes, the list of subsets has to generated first and stored somewhere. This is why attemptOne uses more time and memory, namely $k\, O({n \choose k})$ of both. I ...
Henrik Schumacher's user avatar
10 votes
Accepted

Why are more highly nested lists often not more memory and time-intensive?

A packed arrays (or a MTensor on the C++ side of Mathematica) consists of a linear array containing all entries plus the information needed for storing of the ...
Henrik Schumacher's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible