I want to know how can I fetch the Complete Google Spreadsheet with more than 80K rows using "List-based Feeds" in Google Spreadsheet.
To make it more clear, the flow of the application is as follows:
- Connect to Google Spreadsheet using service.getFeed()
- Using List-based Feeds fetch all the rows and push the task in the task queue to enter the data into datastore.
Problems: 1. The application works fine on localhost, but when deployed, timeout error occurs stating "HardDeadlineExceeded Exception". I had read the documentation of this exception and found that handling such exception would be of not much use. Following code is used to establish connection and get List-based Feeds:
try
{
lf = service.getFeed(url, ListFeed.class); //Exception occurs at this point
timeoutflag=1;
}
catch(Exception e)
{
timeoutinc += 3;
service.setConnectTimeout(timeoutinc * 10000);
service.setReadTimeout(timeoutinc * 10000);
}
The second exception I get is: out of memory Exception
java.lang.OutOfMemoryError: Java heap space at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse (SAXParserImpl.java:642) at org.xml.sax.helpers.ParserAdapter.parse (ParserAdapter.java:430) ...
I had gone through the official documentation of Google and found that I can use Cell-based feeds, but as my application completely depends upon List-based feeds, shifting to Cell-based feeds is not an optimal choice for my use case as I need to fetch the data row by row and not cell by cell.
Please guide...!