MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Minimizing Mathematica file size for source code control?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83279] Re: Minimizing Mathematica file size for source code control?
  • From: dr DanW <dmaxwarren at gmail.com>
  • Date: Fri, 16 Nov 2007 05:43:00 -0500 (EST)
  • References: <fhh7db$8n6$1@smc.vnet.net>

On Nov 15, 4:35 am, Gordon Robertson <grobert... at bcgsc.ca> wrote:
> I'm relatively new to Mathematica v6. I want to start to commit
> notebooks to an SVN source code repository. Many of my notebooks
> contain imported files and plots generated from the files; such
> notebooks are often larger than 20MB.
>
> Because I will/can regenerate data imports and plots when I next run the
> notebook, it should be possible to routinely reduce the file size by
> removing these data from the notebook, so that notebooks can be comfortably
> submitted to source control.
>
> Could I ask more experienced Mathematica users for comments on how to address SCC?
>
> G
> ---
> Gordon Robertson
> Gene Regulation Informatics
> Canada's Michael Smith Genome Sciences Centre
> Vancouver BC Canadawww.bcgsc.ca
> grobert... at bcgsc.ca

Go to Cell > Delete All Output to quickly get rid of all generated
cells.  If you have a lot of graphics, this can dramatically reduce
the size of your files.

Another useful trick is to Alt-click on a cell bracket, and all cells
of the same type are selected.

Also consider using Wolfram Workbench.  This is an Eclipse-based
Mathematica development platform that interfaces directly with
versioning control software.  All the code is entered and stored in
RawInput form, so it is very space efficient.  It also requires you to
learn how to work in RawInput form, which is very different from the
Notebook interface.  RawInput is the input style favored by old-school
Mathematica programmers (such as the developers themselves) who are
used to programming solely in characters available on a standard
keyboard.  For example, using Pi and E instead of the nicely typeset
versions we like in the Notebook interface.  If you have a Premier
license, you should be able to download it directly from Wolfram.


  • Prev by Date: Re: Multiple Constants
  • Next by Date: Re: Multiple Constants
  • Previous by thread: Re: Minimizing Mathematica file size for source code control?
  • Next by thread: Re: Minimizing Mathematica file size for source code control?