hello,
im having a discussion w/ one of my associates, and we're are trying
to get a consensus on a possible performance scenario. we're working
a/ 3-rd party component that produces PDFs using "XML-FO", a verbose
description & layout doc. it can accept either:
1) a complete, verbose XML-FO doc
2) data-only XML, plus an XSLT doc to produce valid verbose XML-FO,
which it transforms
.....we have our source data in memory as many collection objects. thus
we need to convert it into something usable (either XML-FO, or XML).
there are two options:
1) iterate thru the collections, using a StringBuilder to build the
final verbose doc in code. lots of presentation tags, which is sorta a
bummer cuz its all static strings if using StringBuilder.
2) iterate thru the collections, using a StringBuilder to build a
smaller data-only XML, then use an XSLT doc to perform transform for
final verbose doc. designing the XSLT in an XML-smart editor is a
plus.
....i know its sorta a vague question w/o a lot of detail, but in
general what do you think would be faster? heavier string
concatenation, or less concats + a transform?
for maintenance & readability using an XSLT doc may be preferred, even
if the performance differences are negligible. but we are curious
about the hypothetical speed differences of the two, if any.
what are you thoughts?
thanks,
sm