A list for the developers of CellML tools

Text archives Help


[cellml-dev] Very slow getPositionInXML function in VACSS


Chronological Thread 
  • From: alan.garny at dpag.ox.ac.uk (Alan Garny)
  • Subject: [cellml-dev] Very slow getPositionInXML function in VACSS
  • Date: Wed, 18 Jan 2012 18:58:04 +0100

Hi,



I have some code which I use to validate a model
<https://github.com/opencor/opencor/blob/master/src/plugins/misc/CellMLSuppo
rt/src/cellmlmodel.cpp#L137> and after testing it on a moderately big model
(which has various warnings and errors), I was shocked to find out that my
code is painfully slow.



After a bit of debugging, the main culprit is the getPositionInXML function
in the VACSS service
<http://cellml-api.hg.sourceforge.net/hgweb/cellml-api/cellml-api/file/6bf20
0f297bd/VACSS/sources/VACSSImpl.cpp#l4726> which I call here
<https://github.com/opencor/opencor/blob/master/src/plugins/misc/CellMLSuppo
rt/src/cellmlmodel.cpp#L173> and here
<https://github.com/opencor/opencor/blob/master/src/plugins/misc/CellMLSuppo
rt/src/cellmlmodel.cpp#L193> (though the execution of my code went through
the first call). The getValidityError function
<http://cellml-api.hg.sourceforge.net/hgweb/cellml-api/cellml-api/file/6bf20
0f297bd/VACSS/sources/VACSSImpl.cpp#l49> which I use here
<https://github.com/opencor/opencor/blob/master/src/plugins/misc/CellMLSuppo
rt/src/cellmlmodel.cpp#L158> is also slow but not 'as bad' as
getPositionInXML.



Anyway, this all stems from the fact that I want/need to know exactly where,
in a CellML file, an error/warning occurred. I may not have approached the
problem in the best way, so any suggestion would be much appreciated. What
is certain, though, is that there is loads of room for improvement in the
aforementioned functions.



Cheers, Alan.




Dr Alan Garny



University of Oxford, Department of Physiology, Anatomy & Genetics

Sherrington Building, Parks Road, Oxford, OX1 3PT, England



<http://cor.physiol.ox.ac.uk/> http://cor.physiol.ox.ac.uk/ -
<http://www.opencor.ws/> http://www.opencor.ws/




Note: I have relocated to INRIA in France and you should email me at
<mailto:alan.garny at inria.fr> alan.garny at inria.fr from 1 February 2012
onwards.



Asclepios Research Project

INRIA Sophia Antipolis

2004, route des Lucioles - BP 93

06902 Sophia Antipolis Cedex



Phone: +33 49238 7789





-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.cellml.org/pipermail/cellml-tools-developers/attachments/20120118/6280d105/attachment.htm>




Archive powered by MHonArc 2.6.18.

Top of page