handling a compute intensive operation
<p>I'm writing a web based application (large cargo aircraft weight and balance) in which the user enters pallet weights. When an individual pallet weight is entered, a number of checks have to be made to determine if that weight can be accepted. The checks are all relatively trivial in terms of compute cycles required; one is not. As I understand it, JavaScript is single-threaded, which I take to mean that if the user starts to enter a weight in another pallet position, he's going to be locked out until the previous weight is fully processed.</p>

<p>I can't afford to have the user waiting every time he enters a weight (which they don't have to do at the moment as the app currently doesn't make that last check properly). Currently I'm thinking of not doing the final compute-intensive step until all weights are entered and the user signifies so by clicking on a button. However, this will deprive the user of immediate feedback as to which weight initially triggered the problem, a problem in which multiple weights may contribute, and which is going to be hard to sort out if they have to wait until the last.</p>

<p>My Google searches on the topic have been somewhat useful, but I'm asking here for possible ideas for an up-to-date solution to the dilemma. Any suggestions are most welcome. The context of the problem can be observed by going to <a href="http://terryliittschwager.com/WB/JWB.php" rel="nofollow">http://terryliittschwager.com/WB/JWB.php</a> and selecting an aircraft.</p>
