Optimize AsciiFilter::lineNumber()
In AsciiFilter::lineNumber() we use grep on linux and on BSD to determine the total number of lines in the file which is very fast. For windows we lack this optimization and iterate over the whole file to determine the total number of lines which is very slow for bigger files.
We need to evaluate a couple of other options to determine the number of lines to speed-up this part also on Windows, see for example https://www.reddit.com/r/cpp_questions/comments/11wlf49/whats_the_most_efficient_way_to_get_the_line/ https://superuser.com/questions/942079/count-lines-fast
A pure c++ cross-platform way of doing this without relying on external executable would be even better.