[xml] 2.4.12: generic timing diffs



Hiya,

I've finally found the time to propogate the changes from xsltproc for
timing back to xmllint.

Rationale:
  The timing routines presently use gettimeofday, a non-standard unix-like
  function. This function is not available on RISC OS, and may not be
  available on other systems.

Solution:
  To resolve this problem in a sensible manner and reduce the code required
  to be maintained, new routines called startTimer and endTimer have been
  created to perform whatever is necessary to time a process. These routines
  are conditionally compiled to allow platform variances to be included more
  easily.

Implementation:
  Three versions of these routines are provided - the original
  'gettimeofday' based pair, a 'clock' based pair, and a null pair which
  does no timing. The implementation requires the use of stdarg to ensure
  that the parameters are printed correctly. This does not mean any
  additional dependency for the library, as libxml2 already requires
  variadic argument processing for its error handling.

Dependencies:
  The define HAVE_GETTIMEOFDAY is used to determine if the gettimeofday
  function is available.
  The define HAVE_TIME_H is used to determine if the time.h header is
  availble (and consequently, the standard C clock implementation.
  These may need adding to configuration scripts for whatever platforms
  are used.

Addendum:
  Another minor patch slipped in here; during validation the lines
  which assign to cvp.userData, cvp.error and cvp.warning are concatenated.
  This patch splits them into multiple lines (see source around line 755).

Differences from patch for xsltproc:
  This patch should actually apply without lots of messing around.

-- 
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.

Attachment: xmllint.diff
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]