Bob,

Progress

that fixed my build

here is what I get using

__________________
Long startTime = System.currentTimeMillis();
StringBuilder pdbDataBuilder = new StringBuilder();
icnt = tmpData.size();
for (i=0;i<icnt;i++)
{
     pdbDataBuilder.append(tmpData.get(i) + '\n');
}
tmpData.clear();
String result = viewer.loadInline(pdbDataBuilder.toString());
Long finishTime = System.currentTimeMillis();
System.out.println("Load time = " + Long.toString(finishTime - startTime));

FileManager.getAtomSetCollectionFromString()
The Resolver thinks Pdb
ModelSet: haveSymmetry:false haveUnitcells:false haveFractionalCoord:false
20 models in this collection. Use getProperty "modelInfo" or 
getProperty "auxiliaryInfo" to inspect them.
ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond 
creation
Load time = 4802
____________________

When I use the new function I deplete the heap space

Here is the call and the result

_____________________
Long startTime = System.currentTimeMillis();
Vector<String> data = new Vector<String>(tmpData);
String result = viewer.loadInline(data,false);
Long finishTime = System.currentTimeMillis();
System.out.println("Load time = " + Long.toString(finishTime - startTime));


java.lang.OutOfMemoryError: Java heap space
        at java.io.BufferedReader.<init>(BufferedReader.java:80)
        at java.io.BufferedReader.<init>(BufferedReader.java:91)
        at org.jmol.viewer.DataReader.<init>(DataReader.java:17)
        at org.jmol.viewer.StringDataReader.<init>(StringDataReader.java:8)
        at 
org.jmol.viewer.FileManager.createAtomSeCollectionFromArrayData(FileManager.java:310)
        at org.jmol.viewer.Viewer.loadInline(Viewer.java:1877)
        at 
org.seirad.gentellectV3.singlequery.jStructureViewer.loadStructure(jStructureViewer.java:192)

I am surprised the vector approach requires more memory.  There may be a way 
to cast List to Vector rather than creating a new Vector.

Joe



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to