Did you changed the memory value in snap.conf already?
You’ll find it in the etc folder of the installation directory…
There is the line which starts with ‘default_options=’
In this line you’ll find an option like -J-Xmx5G. Increase the value. You could use something like -J-Xmx13G.