How long does it take to parse a 2.89MB text file?

K.I.L.E.R

Retarded moron
Veteran
ASCII text.

It takes a while on my PC. At least 30 seconds.
Probably due to my use of regex to parse it but assuming I didn't use regex how long is reasonable?
 
The question makes no sense in itself. It's like asking: How much wood does a wood-chuck chuck if a wood-chuck could chuck wood?

It totally depends on what you're doing to the input, and what tools you're using to do whatever it is you're doing.
 
Zaphod said:
How much wood does a wood-chuck chuck if a wood-chuck could chuck wood?

A woodchuck would chuck as much wood as a woodchuck could chuck if a woodchuck could chuck wood.

Anyway, 30 seconds for a 2.89MB file sounds insane. I'd expect something in the 10ms range.
 
Just out of curiosity: what language/platform are you using for your parser: C#.NET, C++, Java, or an scripting language like Perl, Tcl, or Ruby?

Not that it would explain your problem - as Humus said 30 sec to parse a 3MB file with a regular expression isn't exactly normal.
 
Sorry guys.
It was a buffer issue.

Effectively what occured was that the buffer had to be flushed every so often and read new data from HD to RAM before I could continue processing.
Problem solved by simply increasing the size of the buffer.
 
Back
Top