incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <robw...@apache.org>
Subject Re: HugeData in a Spreadsheet
Date Mon, 24 Oct 2011 13:06:32 GMT
On Mon, Oct 24, 2011 at 8:49 AM, Wilson Barbosa
<wilson.barbosa@gmail.com> wrote:
> Dear All,
>
> I'm newbie using the SimpleODS, im getting in trouble when creating a big
> spreadsheet (about 140k rows). When the sheet if growing the performance is
> degrated and in a point i got "java.lang.OutOfMemory" exception. There is a
> way of work in the sheet object like a file?
>

Have you tried increasing the heap size available to the JVM?
Typically you would add a parameter to the command line like:

java -Xmx512m

That sets the heap to 512MB.  Maybe start with 512m and see if that is enough.

> The example of my code (reduced):
> ...
> // Cria objetos da planilha
> SpreadsheetDocument planilha = SpreadsheetDocument.newSpreadsheetDocument();
> Table t = planilha.getSheetByIndex(proxima_sheet);
> t.setTableName("WKS_" + proxima_sheet);
> //
> Cell c = null;
> for(int i = 0; i<65000;i++){
>  <<Logic of Application>>
> }

Can you be more specific?  What Simple API calls are you making inside
the loop?  We can look to see of there is something here we can
optimize,

> ...
>
> Many thanks.,
> Wilson.
>

Mime
View raw message