Displaying Progress
-
I have developed a software that takes text documents as input and after performing a few steps it generates an inverted index....and it takes a little time to do so and i want to display a percentage progress as text label.....and i ve calculated the time taken by each step in this and then changed that time into to percentage and displayed it after the button click.....but the problem now is that when i change the input files this percentage starts to look stupid.....so i want to ask that how can i calculate the percentage wich will work for all inputs.......... Looking forward for help Regards,
-
I have developed a software that takes text documents as input and after performing a few steps it generates an inverted index....and it takes a little time to do so and i want to display a percentage progress as text label.....and i ve calculated the time taken by each step in this and then changed that time into to percentage and displayed it after the button click.....but the problem now is that when i change the input files this percentage starts to look stupid.....so i want to ask that how can i calculate the percentage wich will work for all inputs.......... Looking forward for help Regards,
Okay That's for sure a bad idea to do the time calculation since for the same file, on different machines of different speeds or even in your own machine when it is busy, times may take shorter or longer.... The idea is simple: you should make get to know the size of the input file (in characters, bytes etc.) and then simply check where you are processisng now... For example if the file is 100 characters long, and you are now processing the 23rd character, you are at 23% of your process.... Hope this could give you the idea....
-
Okay That's for sure a bad idea to do the time calculation since for the same file, on different machines of different speeds or even in your own machine when it is busy, times may take shorter or longer.... The idea is simple: you should make get to know the size of the input file (in characters, bytes etc.) and then simply check where you are processisng now... For example if the file is 100 characters long, and you are now processing the 23rd character, you are at 23% of your process.... Hope this could give you the idea....
Sir the real problem is that i m reading about 350 files and i m performing one step at a time ist i read all the files then in the next step i remove the white spaces from it in next step i remove some unecessaray words from this dataset and few more steps like that i m doing it this way that i ist checked the total execution time of the program then i checked that how much time each of these steps take and then i divided that into percent of total time and then in each step i checked on the basis of all the files present and the file already processed......i hope u understand the problem now :) looking forward for help Regards,
-
Sir the real problem is that i m reading about 350 files and i m performing one step at a time ist i read all the files then in the next step i remove the white spaces from it in next step i remove some unecessaray words from this dataset and few more steps like that i m doing it this way that i ist checked the total execution time of the program then i checked that how much time each of these steps take and then i divided that into percent of total time and then in each step i checked on the basis of all the files present and the file already processed......i hope u understand the problem now :) looking forward for help Regards,
Are you saying that you are looping through the files for EACH step? If so you are probably executing more loops which in itself will slow down. Prev poster is correct though, you CANNOT make a decision based upon time of execution, it just won't work for every (many) circumstances. BTW, I'm still unclear of what you're really trying to do!