2
$\begingroup$

Yesterday I tried to figure out why my Mathematica file reached a gigantic size of 54 MB. By deleting, it would seem, all the graphs and tables with the results of calculations, I was able to reduce the file size to 37 MB. After examining the contents of the file in a text editor, I discovered mysterious arrays of numbers. Fortunately, I guessed to climb the menu, where I found the item Cell | Delete All Output. After applying this menu item, the file size immediately decreased to 700 kB, and the mysterious arrays of numbers inside the file disappeared. With that in mind, my first question is:

What were these arrays and how could they appear?

In the same Cell menu, I noticed the Notebook History item. After playing around with this item, I found out that there are cells in the notebook created back in 2007. After clearing the history, I reduced the file size to 300-400 kB. In this regard, my second question is:

Why save notebook history? The help says that saving history can be disabled. Can you give an example of the practical benefit of preserving notebook history?

$\endgroup$

1 Answer 1

3
$\begingroup$

The "notebook history" is just a record of times when cells were changed. It does not keep track of cell contents. I believe it is very unlikely that this is what took up a lot of space in your notebook. If the size decreased after deleting output cells, then it was the output cells that required a lot of storage, not the record of cell change times. Note that output cells can't have a longer history record than corresponding input cells.

Some expressions can take up a lot of storage space even if they take up little space on screen. Examples include images, audio, graphics, iconized expressions, and many of the expressions rendered as summary boxes. This is what has mostly likely happened in your case.

As for the purpose of recording cell change times: it's the same as keeping a record of anything. If you have such a 15 year-old notebook, you can check when you modified it, and maybe do a bit of personal analytics. You can turn this off if you don't like it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.