Behaving text files like binary files
My program reads a text file as input. This text file is output of another program (Squid's access.log) so it isn't of my choice to choose another format.
My program should read this file every N minutes and see if new lines is added to it,add this new information to a database. Now I store a parameter called CurLineNo and every time I read lines from the begining,ignoring them until I reach CurLineNo and after that ,processing lines and increasing CurLineNo. But this method is slow as the input file grows:(
I want to know if there is any other way or trick that I could do it faster, similar to binary files for example.