StefanLindel / codeswarm

Automatically exported from code.google.com/p/codeswarm
GNU General Public License v3.0
0 stars 0 forks source link

Reduce startup time and memory footprint by loading xml via streams #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
... but don't break backwards compatibility by requiring that all input
always be sorted

The attached patch adds an option to code_swarm config files:
IsInputSorted

By default it's false, in which case code_swarm behaves as it always did. 
However, if it's true then the XML file is loaded in the background, and no
more than 5000 events will be held in memory at any given time.

The practical effect of this is that the visualization starts immediately
regardless of the size of the input, and memory usage stays constant at
about 50MB (+ screen buffers if you're encoding images).

The svn and git conversion methods seem to produce sorted input by default,
but mercurial for example does not.  I've provided a python script to sort
the repository xml files.

The code handles unsorted input when told that the input was sorted by
crashing early.

Original issue reported on code.google.com by ric...@gmail.com on 27 Aug 2008 at 9:36

Attachments:

GoogleCodeExporter commented 8 years ago
This really sounds interesting !

Original comment by sebastie...@gmail.com on 2 Sep 2008 at 9:25

GoogleCodeExporter commented 8 years ago
Added most of this.  Didn't add the python script changes yet.

Original comment by nawglan on 17 Nov 2008 at 3:08

GoogleCodeExporter commented 8 years ago
Hello,
Sorry if this is obvious but how can I apply the patch?

Thanks

Original comment by jafarsol...@gmail.com on 5 Dec 2013 at 6:41

GoogleCodeExporter commented 8 years ago
I'm on Windows 7 by the way and don't have any Java experience.

Original comment by jafarsol...@gmail.com on 5 Dec 2013 at 6:50