|
| |
Don't use XML where it doesn't make sense. XML is not a panacea.
You will not get good performance by transferring and parsing a
lot of XML files.
Using XML is memory, CPU, and network intensive.
|
| |
Avoid creating a new parser each time you parse; reuse parser
instances. A pool of reusable parser instances might be a good idea
if you have multiple threads parsing at the same time.
|
 |  |  |  | XML Application Performance |  |  |  |  |
| |
-
Turn validation off if you don't need it. Validation is expensive.
Also, avoid using a DOCTYPE line in your XML document. The current
version of the parser will always read the DTD if the DOCTYPE line
is specified even when not validating.
-
For large documents, avoid using DOM which uses a lot of memory.
Instead, use SAX if appropriate. The DOM parser requires that
the entire document be read into memory before the application
processes the document. The SAX parser uses very little memory
and notifies the application as parts of the document are parsed.
|
|