I am creating a tool for a XML file convertor. The schema for the XML file is changing and the tool will take the xml file in format A and convert it to format B.(there is a huge change in the schema stucture).
Is there any way to calculate the amount of time it will take for the file conversion? Is there any standard method/formula?(depending on the size of the file etc)
(File size can go upto 4GB)
Identify a couple of size classes, like.
Parse a couple of random exemplary files for each size class, take the total time for each class and divide with the amount of files to get the average.
Now take the numbers that you calculated and apply to the rest of the files by multiplying with the amount of files in each class.
Requires minimal control and gives you a reasonable estimate.
With some knowledge of the document type, you could also group them by that, since different document structures tend to take varying time.
Real Time Progress
This is a pretty neat trick you could use, overlay whatever reader class you will be using by your own implementation that forwards any read calls while logging the amount that was requested. Given that you know the size of the file you now have a way of displaying progress (i.e. a percentage, or part out of total).
Since parsing is usually what takes most time with xml processing this, this should give you a good indication of how fast it is working.