[BioC] slow graph methods

Seth Falcon sfalcon at fhcrc.org
Thu Sep 27 05:41:26 CEST 2007


Paul Shannon <pshannon at systemsbiology.org> writes:
> Hi Martin,
>
> Great idea.  I'll try it.
>
> Thanks!
>
>   - Paul
>
> On Sep 26, 2007, at 2:16 PM, Martin Morgan wrote:
>
>> Seth accumulated nodes / edges to
>> be added in an environment, which does not get copied (the way a list
>> would) each time it is changed. Maybe that perspective helps you to
>> revise your code to add nodes in batches, rather than individually?

The code that I added for reading GXL files is in graph/R/gxlReader.R
in the graph_handler function.  You will have to "read through" the
XML event parsing, but perhaps it will give you a more concrete
example of using environments to accumulate data needed for one or two
big calls to the graph functions and avoiding the incremental calls
which are slow due to copying (as others have explained in this
thread).

Best,

+ seth

-- 
Seth Falcon | seth at userprimary.net | blog: http://userprimary.net/user/



More information about the Bioconductor mailing list