How to avoid gray screen in PivotTable?

Hello I have a LibreOffice Version: 5.1.6.2 in Ubuntu 16.04 LTS. I use a machine with 8GB of memory and I opened a CSV file with 427,489 lines. When I try to make PivotTable the program crashes and the screen turns gray. It takes a few minutes to execute each command

The screen of the gnome-system-monitor appears this, only with the LibreOffice and the gedit opened, when I give the command of the Pivot Table:

cpu 1 - 100% cpu 2 - 3% cpu 3 - 3% cpu 4 - 3% (it will toggle some CPU with 100%)

Memory 2.4 GiB - 31.8%

After about 8 minutes go to the first Layout screen

When I select the options again the gray screen appears and it takes again to show the result

On a machine with Windows and 4G of memory ran in Excel, without delay

Please, is there any way to solve this? Or do I need a computer with more memory?

It’s a lot going on here so you should first try to update LO to at least 5.3.7 but better would be to go with 5.4.3. And try to repost this question to LO users mailing list. You’ll get good answers there. Just note that your e-mail address can be viewable and messages are permanent.