perf had dropped by 10% - fixed it by moving string to buffer conversion to JS wrapper