|
From my RPG code, I have no control over the Java routines. How would I get
to run SS_freeLocalRef(TempStr); on a more frequent basis.
from: darren@xxxxxxxxx
There is an issue with the JNI interface where if you define an object, its
not automatically marked as garbage. This is because you're programming in
RPG, not Java. There are a couple things you can do, which include marking
the object itself as obsolete, or you can define a start and end point,
where anything created within that point range is marked as garbage for the
collector.
Here are some code examples. I think these routines are in the base
service tool from Scott Klement, but we have modified them, so I don't
remember for sure:
callp hssf_begin_object_group(100);
callp hssf_end_object_group();
SS_freeLocalRef(TempStr);
One other thing you'll notice. If you're building a 50,000 row
spreadsheet, you're going to be using a lot of the available heap memory
anyway. If this becomes an issue, we switched a lot of our generation to
the SXSSF method of routines. This does require creating a couple more
java prototypes, but it allows you to create a spreadsheet of almost
unlimited size. The downside to this streaming method is that you can't
refer back to previous rows within your code...at least not very far back.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.