Using web worker for better performance