G
Guoqi Zheng
Dear sir/lady,
I need to process our web server log file every day. Normally, this file is about 50MB - 100s MB big. How can I read the file in a effective way.
I can open a streamreader to read it and use readline() function to read line by line and process them. However, this sounds very slow. I can also use readtoend to read everything into a string, but then I am afraid that it will be too big for memory.
How should I read the file?
I need to process our web server log file every day. Normally, this file is about 50MB - 100s MB big. How can I read the file in a effective way.
I can open a streamreader to read it and use readline() function to read line by line and process them. However, this sounds very slow. I can also use readtoend to read everything into a string, but then I am afraid that it will be too big for memory.
How should I read the file?