java - Running out of system resources -


i have method take resultset , create list of object[] each row reads. 1 of queries put on server gets on 4million rows back. however, each row (at max) 40 characters.

even though 4million rows poop ton, plus 40 chars per row shouldn't cause me run out of resources, alas does.

    resultsetmetadata rsmd = someresultset.getmetadata();     int columncount = rsmd.getcolumncount();     someresultset.last();     int totalrows = someresultset.getrow();     list<object[]> result = new arraylist(totalrows);     list<string> columnnames = new arraylist();     list<object> addrow = new linkedlist();     double somevalue = 0d;     (int x = 0; x < columncount; x++) columnnames.add(rsmd.getcolumnname(x+1));     numberformat nf = numberformat.getinstance();     someresultset.beforefirst();     while (someresultset.next()) {         addrow.clear();         (int x = 0; x < columnnames.size(); x++) {             if (someresultset.getobject(x + 1) instanceof double) {                 somevalue = someresultset.getdouble(x + 1);                 addrow.add(nf.format(somevalue));             }             else if (someresultset.getobject(x + 1) != null) addrow.add(someresultset.getobject(x + 1).tostring());             else addrow.add("");         }         result.add(addrow.toarray());     } 

why running out of system resources? on box develop on, have no issues running this, on box needs run on no love.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -