-- Regards, Phil Friedman -- Terralink Software 1-207-772-6500 x101
John Gentilin wrote:
I just ran OptimizeIt running a servlet that uses the SQL extension and performed 100's
of queries and could not see any memory leaks in the SQL package. I did however saw
some concern with org.apache.xalan.templates.AVT, but I need to check into it further
to make sure my caching is not causing the problem. There seems to be a lot of allocation
around the org.apache.xalan.lib.sql.ObjectArray but on GC, they are all reclaimed.
Now all this is with Streaming enabled, I don't have a ready example with streaming disabled.
-JG
John Gentilin wrote:
Phil,
Sorry about that, was away for a few days. Anyway, plain old eclipse won't give you what you want.
Here is a pointer to a plugin that will do the trick, never used it myself so I am not sure how
it works. When you run Process in eclipse, make sure you put the jars in the endorsed directory.
http://eclipsecolorer.sourceforge.net/index_profiler.html
Try to get a global profile of all classes, you should probably see String at the top of the list.
If there is too much noise, then get a profile including only the org.apache.xalan.lib.sql, the java.jdbc.* and the sybase classes. If that does not tell you much, open the filter up to include all the org.apache.xalan classes.
I use OptimizeIt from Borland, I haven't used the profiler in a while. If I can carve out some
time next week, I will try to set it up and test some of my code.
-JG
Phil Friedman wrote:
I can run the transformation from xalan...process in Eclipse. Is there a way to show what objects are accumulating?
I need to have streaming mode off, because of the way the results are handled which was originally written against Xalan 2.0.1. I'm also using the default connection pool because I do concurrent queries (again, worked with just one connection with 2.0.1)
This happens both exporting from the database (typically tens of rows per query) AND importing into the database (typically one row few columns result per query like this: "update or insert ... select @@rowcount").
We run two very similiar tranformations (the core xsl files with the SQL calls included in both): 1) from our own Java where we call the same transformer multiple times with a streamed input, 2) using the Xalan...process method from a commandline of one input file and one set of xsl. 1 is always single "objects" per transformation (scores of SQL batches) 2 is usually many (hundreds or thousands) of "objects" per file/transformation with scores of SQL batches per "object". 1 is running under Tomcat so it is more difficult to see the memory usage, It is not in production yet. 2 definitely has the problem.
-- Regards, Phil Friedman -- Terralink Software 1-207-772-6500 x101
John Gentilin wrote:
Phil,
Do you have any profiling ability to see what objects are accumulating ??
If you have streaming mode on, the default is on, memory consumption should be almost
none once the first row has been read.
Can you explain more how the batches work. i.e. Are you using one XSL file that does
all the work or are you creating a transformer that runs multiple times.
The other changes should be in CVS soon. I just started using Eclipse to be my CVS interface and
I made the critical mistake of checking out of cvs-public which is read only so now I am in the process
of doing a little code surgery.
-JG
Phil Friedman wrote:
After a bit of testing, we've found that transforming larger documents (more sql batches) the JVM requires much more memory for the same SQL as Xalan 2.0.1. We're using -Xmx1024m but we still get java.lang.OutOfMemoryError. While we can transform the same file (as well as 5x larger files) in 2.0.1 and the JVM never grows beyond 128MB to complete. Any ideas?
Moraine Didier wrote:
Hem ... You're right Phil, I have problem with my previous code also.
This one seems to work better ;-)
public void close(Object sqldoc) throws SQLException {
if (DEBUG)
System.out.println("Entering XConnection.close(" + sqldoc + ")");
DTMNodeIterator dtmIter = (DTMNodeIterator)sqldoc;
XNodeSet xNS = (XNodeSet)dtmIter.getDTMIterator();
OneStepIterator iter = (OneStepIterator)xNS.getContainedIter();
DTMManager aDTMManager = (DTMManager)iter.getDTMManager();
SQLDocument sqlDoc = (SQLDocument)aDTMManager.getDTM(xNS.nextNode());
sqlDoc.close();
}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]