1

I have a html application which has a search functionality on a bunch of htmls

I have a method called searchAndPopulate(keyword) . this method is intended to find the results and populate the results and results counts. But the issue here with this javascript function is, it is not updating the counts and results in UI continuously as soon as each result processed, Instead it freezes the screen and throws results on a go at one time after all results are fetched. Am new to web worker, please help me how I can call this method using webworker to make it as a thread so that it will make a smooth UI experience with incremental results and counts shown to user. Please Give me a idea on how I can achieve it with webworker or any other possible way.

Note: the methods calls deferred methods inside it. and I have already tried giving small timeout between each process it is not working coz of deferred methods might be keep freezing the UI. Can't Post code coz it is a tangled part of a large code base

Any help would be highly appreciated

1 Answer 1

0

I found this tutorial to be pretty helpful: http://www.html5rocks.com/en/tutorials/workers/basics/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.