@karlnapf 
For different user, the kernel matrix will be different size, it depends on the rating records count in the training set. So it's hard to pre-allocate the matrix.