Actually, how to make a progress bar when downloading files is understandable, but the fact of the matter is that I have a function to import data from a file. We load the file instantly, it doesn’t weigh anything, then we parse it for each line and enter it into the database:
INSERT INTO `datas` ...
This, of course, is done via AJAX, but if there is a lot of data, I would like to show some progress bar: how much is already loaded, how much is left.
But I don’t want to contact the database in parallel every second and see how many new lines there are, this is an extra load, I think. Is it possible to do something differently?