On Tue, Oct 16, 2012 at 10:25 AM, Rick McGuire <object.r...@gmail.com>wrote:

>
> Just had a thought on how you might want to optimize things here.  I'm
> guessing that with the array of directories, you are using the
> DirectoryPut() API for setting values.  While this API does provide a level
> of convenience, it does have some downsides for situations like this.
>  Specifically, this ends up creating a new string object for every
> directory name you set.  So, for 20,000 records with 150 fields, your
> result set will end up creating 3,000,000 string objects just for the value
> names in the result set.  This is overhead over and above the actual data.
>  As an optimization, you could create a single string object for each field
> at the start, then use SendMessage() to invoke the directory PUT method
> using the cached names.  This will not create a new name object for each
> value added.  Since garbage collection overhead is heavily determined by
> the number of live objects, eliminating almost 3 million objects from
> consideration should be a pretty good performance boost.  This will also
> result in many fewer GC cycles on top of that.
>


Okay, thanks Rick.  That sounds good.

Originally, I was processing the column names every time a new record was
produced.  What I changed was to cache the CSTRING column name rather than
process it every time.  That seemed to save about 10% in processing time.

But, for each record I'm still doing a directory put with the cached
CSTRING.  I'll switch to your suggestion, which makes a lot of sense.

--
Mark Miesfeld
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to