Experimental optimisation to reduce memory overhead, replace list sorts and folds with qlc versions within the same transaction