Most likely you need to take that up with Sun. String.getBytes() is the real issue. And the XPath under the covers for valueOf() returns a String. For any String with a large amount of data, this is the case.

To try and do anything with the bytes without converting it to the appropriate code page may make matters worse. I would suggest looking for other areas to optimize. Maybe perform your own xpath query instead of using the Node.valueOf and "cache" the xpath for future use. That could cut down on startup overhead each time valueOf is called.

Later,
Dave

David Thielen wrote:
Hi;



Is there a way to get the result of a Node.valueOf() as an array of bytes? I know I can convert a String to a byte[] but for a large amount of data this is a giant hit.



Thanks – dave





--

+------------------------------------------------------------+
| David Lucas                      mailto: ddlucas @ lse.com |
| Lucas Software Engineering, Inc.   (740) 964-6248 Voice    |
| Unix,Java,C++,CORBA,XML,EJB        (614) 668-4020 Mobile   |
| Middleware,Frameworks              (888) 866-4728 Fax/Msg  |
+------------------------------------------------------------+
| GPS Location:  40.0150 deg Lat,  -82.6378 deg Long         |
| IMHC: "Jesus Christ is the way, the truth, and the life."  |
| IMHC: "I know where I am; I know where I'm going."    <><  |
+------------------------------------------------------------+

Notes: PGP Key Block=http://www.lse.com/~ddlucas/pgpblock.txt
IMHO="in my humble opinion" IMHC="in my humble conviction"
All trademarks above are those of their respective owners.



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to