Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[birt-dev] Question about XMLWriter classes and performance

Hi,

I was profiling BIRT using a test which runs a report to create the
report design document. I noticed some amount of time being spent in
org.eclipse.birt.report.model.util.XMLWriter methods, specifically in
the calls to java.io.PrintStream.print(char). Has anyone else seen
this? At least in some of the methods in the above class, I have not
understood the reason to print character by character. After going
through the code, I have a few questions and would appreciate if
someone can answer them:

I see there are XMLWriter classes in two different BIRT sub-projects -
one is used to write the report document and other one is used in the
emitter:

org.eclipse.birt.report.model.util.XMLWriter - uses java.io.PrintStream
org.eclipse.birt.report.engine.emitter.XMLWriter - uses java.io.PrintWriter

1. One class uses PrintStream and other uses PrintWriter. Is there any
performance advantage of using one over the other?

2. The methods in org.eclipse.birt.report.model.util.XMLWriter print
character by character. In some methods like textCDATA, literal etc
where we can print without checking
for any escape sequences, it still seems to be printing character by
character if a variable markLineNumber is set to true. What is the
purpose of markLineNumber
variable?

Thanks,
Deepa


Back to the top