End of Google Reader and gReader combo: offline reading Android alternatives

Google Reader users have seen the end nearing of their favorite RSS aggregator and for a while now the webinterface makes it perfectly clear:

Reader will not be available after July 1, 2013. Please be sure to back up your data.

Yes, it stops in 1 month! As a long-time fan I’ve been using Google Reader for aggregating my news and blogs I’m interested in, and used the gReader Android app to synchronize with my account, download updates for offline use so I could browse and read through them while travelling to work. In the train that is. I’ve come to rely heavily on the offline reading feature, since there are many 3G network black spots on the route from and to work – and the wifi inside the train is sometimes far from performing. gReader and my Google Reader account work perfect together: at home gReader updates all feeds, and immediately downloads all article content (incl. images) and transforms them into a simplified format.

As soon as Readers’ retirement got out, the future of gReader also became unsure and a group has been opened to discuss alternatives. Apart from the suggested alternative RSS readers, gReader itself needs to find an alternative API which mimics the Google Reader API to stay useful. Sofar I have seen promises and possibilities of compatible API’s popping up, but even if one was out there and 100% compatible Google urls are still hardcoded in the gReader app.

Continue reading “End of Google Reader and gReader combo: offline reading Android alternatives”

GWT Compiler Is Running Out of Memory

As part of evaluating an open-source framework which uses Google Web Toolkit I ran into some of the familiar issues I already had a few times earlier with the GWT (GWT 2.4 or 2.5) Maven plugin compilation running out of memory. You know, when you see…

…at the start:

[INFO] #
[INFO] # There is insufficient memory for the Java Runtime Environment to continue.
[INFO] # Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate

…or during compilation:

[INFO]    Compiling 12 permutations
[INFO]       Compiling permutation 1...
[INFO]       Process output
[INFO]          Error occurred during initialization of VM
[INFO]          Could not reserve enough space for object heap

This post is basically a compilation of the answers found online, and a quick reminder for myself and others who are running into similar problems with the fantastic GWT compiler :-).

1. First of all, check if you actually need to compile everything! Skip some browsers or locales – saving all kinds of permutations – if you don’t need it for development. Use the tips about how to speed up the GWT compiler and GWT compilation performance. There’s also an existing FAQ about GWT Debugging and Compiling.If you have control of your machine, cut down on other running applications and processes while you’re compiling.

2. Pass along some more memory

…to Maven, e.g.:

MAVEN_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m

…and/or to the gwt-maven-plugin, e.g.:

<configuration>
  <extraJvmArgs>-Xms768m -Xmx768m</extraJvmArgs>
</configuration>

You’ll have to play a bit with the values, depending on the machine you’re working on and the actually available working RAM.

Add some permgen space, which is used when GWT compiles Java into Javascript. E.g.

-XX:MaxPermSize=1024m

3. Try lowering the number of workers to a number explicitly below your available cores/cpu’s. If this number isn’t defined explicitly, the gwt-maven-plugin will set these to the number of available cores/cpu’s. Less workers = less parallellisation = less memory overhead.

<configuration>
  <extraJvmArgs>-Xms768m -Xmx768m</extraJvmArgs>
  <localWorkers>3</localWorkers>
</configuration>

4. Try having the “workers” work in threads, instead of spawning new processes.

<configuration>
  <extraJvmArgs>-Xms768m -Xmx768m -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>
  <localWorkers>3</localWorkers>
</configuration>

Hopefully this will save someone some valuable time finding solutions. If you have other options, feel free to add them in the comments.

Trying to reach google.com…

Since several weeks been getting “Trying to reach google.com…” a LOT when editting e.g. a spreadsheet in Google Apps – causing any updates to the document to get lost.
Seemed that I was opening the Google Docs url on HTTP instead of HTTPS. After manually changing the url in the addressbar to https://docs.google.com or https://spreadsheets.google.com all was fine again!