How to handle THnSparse larger than 500Mo

I explain there the error message you get and I also propose a trick using which one can reduce the amount of the required RAM (for a 3 dimensional THnSparse) by (up to) a factor 6.