fix: optimize performance on REST output