It's certainly an interesting idea. The reader is a linear reader, so it
should not matter. I think the method might exclude XML formats and, of
course binary formats, just because those aren't line oriented, but all the
rest are. I wonder.... So what you suggest is replacing a "BufferedReader"
with a "StringArrayReader" in effect. I probably have just enough time to
try that.

So you will give me a String[] or a Vector?

Bob


On Wed, Nov 4, 2009 at 10:53 AM, Joe Gatewood <[email protected]> wrote:

>  Bob,
>
> I managed to get the data sets with multiple models to load inline.  I had
> to increase the heap size.
>
>
>
> I am currently of the opinion however that loading files from arrays could
> be made more efficient.
>
> As you obviously know using the inline approach includes
>
>
>
> Convert the array of lines to a “really big string” with some form of line
> delimiters
>
> Pass this “really big string” to Jmol which then looks for the delimiters
> and breaks the string back into an array.
>
>
>
> All this is just to get the data back into the starting form.
>
>
>
> Is there a reason we can not just pass an array of data directly to Jmol?
>
>
>
> Thanks,
>
> Joe
>
>
>
>
>
>
>   ------------------------------
>
> *From:* Robert Hanson [mailto:[email protected]]
> *Sent:* Monday, November 02, 2009 12:01 PM
>
> *To:* [email protected]
> *Subject:* Re: [Jmol-developers] inline clarification
>
>
>
> Joe, there shouldn't be any need to write a file - you are correct; you
> should be able to use those directly. The Java StringBuffer is a very
> efficient mechanism. Don't use String = String + line. Use
>
> StringBuffer sb = new StringBuffer();
> int nLines = myArrayList.size();
> for (int i = 0; i < nLines; i++)
>   sb.append(myArrayList.get(nLines)).append('\n');
>
> viewer.loadInline(sb.toString());
>
>
> That should be equivalent to loading the multiple models as separate models
> -- it will automatically create a model for each MODEL statement.
>
> Bob
>
>
>
>
> ------------------------------------------------------------------------------
> 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
>
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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