c# - StringTemplate bad performance -
i'm using stringtemplate generate xml files datasets. have more 100,000 records in dataset enumerated loop in template. goes slow (15-20 secs per operation) performance not me.
this example how use st render report:
using (var sw = new stringwriter()) { st.write(new stringtemplatewriter(sw)); return sw.tostring(); }
stringtemplatewriter simple writer-class derived istringtemplatewriter without indentation.
by way, in debug screen see lot of such weird message:
"a first chance exception of type 'antlr.noviablealtexception' occurred in stringtemplate.dll"
in deep of debug found parses template recursively , if failed (don't know exactly) throws noviablealtexception exception return deep of stack surface, guess problem in using of try-catch-throw's.
google found nothing useful on this.
main question: how decrease number of exceptions (except rewriting code of st) , improve performance of template rendering?
st parses st templates , groups antlr. if getting syntax errors, template(s) have errors. bets off performance throws exception each one. antlr/st not @ fault here ;) terence
Comments
Post a Comment