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: Thu, 19 Jan 2012 17:04:22 +0100

Indeed, Jonathan...

Otherwise, a minor correction to one of my claims, namely the fact that
getValidityError is also somewhat slow. Well, this is not the case (at
least, not to the point where it hangs things up). However, validateModel()
is rather slow. Just some numbers using my somewhat big CellML model:
- To validate the model (using validateModel()) takes about 5 seconds; and
- To get all the warnings/errors associated with the model (incl. the line
and column numbers, using getPositionInXML()) takes about 40 seconds.

For comparison, to open, validate and get all the warnings/errors takes less
than 1 second in COR...

Alan

> -----Original Message-----
> From: cellml-tools-developers-bounces at cellml.org [mailto:cellml-tools-
> developers-bounces at cellml.org] On Behalf Of Jonathan Cooper
> Sent: 19 January 2012 11:08
> To: cellml-tools-developers at cellml.org
> Subject: Re: [cellml-dev] Very slow getPositionInXML function in VACSS
>
> Hi Alan & Andrew,
>
> I would have thought this is a very common and presumably solved problem
> for XML editors? Perhaps look at what things such as the eclipse XML
editor
> plugins (e.g. http://www.eclipse.org/webtools/sse/) do?
>
> Best wishes,
> Jonathan
>
> On 19/01/2012 08:21, Alan Garny wrote:
> >>> When someone opens a CellML model, I want that person to know
> >>> straightaway whether the model contains errors/warnings, so not an
> > option.
> >> We are talking about getPositionInXML, not running VACSS validation -
> >> you can get the list of errors, but it is assigning line and column
> >> numbers in
> > the
> >> raw XML to those errors that is expensive. Why not just do what the
> >> xulrunner-based OpenCell did, and show the errors, without a line
> >> number, and only work out where the error is in the file at the point
> >> the user
> > wants to
> >> go to the error location?
> > This wouldn't be perfect, but it would indeed 'address' my issue with
> > getPositionInXml. Not perfect because, as in OpenCell, you can end up
> > with many messages that read exactly the same. For example, if I open
> > that moderately big model in OpenCell, I get many messages that read
> "Warning:
> > MathML equals element has inconsistent units between the sides" which
> > from an end-user's perspective doesn't mean much: no idea where the
> > warning originated from (unless you in the right view and double click
> > on the message).
> >
> > Otherwise, even though getPositionInXml is indeed my current
> > bottleneck, getValidityError is also somewhat slow...
> >
> > Alan
> >
> > _______________________________________________
> > cellml-tools-developers mailing list
> > cellml-tools-developers at cellml.org
> > http://lists.cellml.org/mailman/listinfo/cellml-tools-developers
> _______________________________________________
> cellml-tools-developers mailing list
> cellml-tools-developers at cellml.org
> http://lists.cellml.org/mailman/listinfo/cellml-tools-developers





Archive powered by MHonArc 2.6.18.

Top of page