Progress bar on file processing issues


I have a interface that let the user to upload a .csv file , then once submitted it uploads the file , it analyses the file , process it and update it to the db.

All this time i need to know the details of the file, number of records and processing progress.

All good until the processing part, it starts, it shows the progress and always once the thread finishes on the page are few records less than the processed ones, for example on processing i have 700 records , on console log it shows that it processes 700 on the web page it shows 645, 636 and so on, not 700 as it should even if all the files were processed, on the update timer i put the smallest size 300 ms and it has an close to the value value, if i put 1000 or 2000 i get even smaller numbers .

Any idea how to have that number accurate and shown on the page ?

Thanks a lot.

Oy, that could be just about anything. Maybe you are stopping the timer when the thread is finished and the the last update doesn’t get sent to the browser?