mailRe: Long loading time of saved states


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on February 13, 2014 - 12:49:
Hi Troels,

The loading of states is rather complicated as there are many parts:

- Compression.  You can turn this off for much faster saving and
loading, relax already supports this.

- Base XML creation and parsing.  This uses standard Python libraries
(xml.dom.minidom), so we have very little control over this.  It might
be worth looking at to see if there can be optimisations made.  I have
never looked into this.  Understanding this library a little might
help with optimising the next part.

- Converting between data structures in the relax data store and the
XML.  These are all the to_xml() and from_xml() functions you can find
in the 'data_store' package.  There have been zero optimisations here
and, in some parts, the code is likely to be extremely inefficient
(too much looping, inefficient ordering of loop nesting, etc.).  This
would be the best target for optimisations.  And the loops are where
you will squeeze out the most.  To find the relevant
functions/methods, just run:

$ grep -r "def to_xml\|def from_xml" . --exclude-dir=".svn"

To perform any optimisations, the test suite must be used to make sure
that nothing breaks.  If you notice a breakage in a save file you are
using as a test for yourself while the test suite passes, then a new
system test needs to be created using a heavily truncated save file.
Anyway, you are free to optimise the save file creation and reading as
much as you wish!

Regards,

Edward


On 13 February 2014 12:35, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> 
wrote:
Dear Edward.

I am storing different runs of R2eff values into state files.

Their file size is app. 5 MB each.

The loading time is about 20-30 seconds for a state file.

Is this an expected normal behaviour?
Or can it be speed up?

Best
Troels

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel




Related Messages


Powered by MHonArc, Updated Thu Feb 13 13:00:08 2014