Libreoffice 5.1.2.2 (Build 1:5.1.2-0ubuntu1) on Ubuntu 16.04 is freezing for me a lot – just hangs, window shades until maybe 10 minutes later it unfreezes. This happens with Impress, Writer and Calc, for nearly empty, text only documents and larger (but not massive) documents alike. Playing with memory settings seems to help a bit. I'm wondering whether there are any optimal memory settings for Libreoffice, or even what exactly the memory settings actually mean.
Note that another PC running 14.04.3 with up to date Libreoffice also has this problem. I think it must be an older version though – I note that the maximum memory is limited to 256mb, whereas 5.1.2.2 does not seem to to have any limit on maximum value of memory. (nothing to do with physical memory – system running 5.1.2.2 has 8Gb of ram. Other system has 16Gb of RAM).
Best Answer
Uninstalling
libreoffice-gtk*
made a significant difference for me. The drawback is that the UI integration would go away.It seems to be a known bug: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1577093