[prog] open file with hundreds of thousand lines....

Abel Pires da Silva lybel_2000 at yahoo.com
Sun Oct 13 00:50:27 EST 2002


Hi all,

I'm testing my simple proxy program (written in C)
that open a file contain with hundreds of thousand
line (about 500000 lines) for address comparation
purposes...(using strstr() function) 
Program will continue to access web server if the
address is not on the 500000 lines list.
I put time function to count the time spent during the
comparation (code from sneha, friendly...) It took
only about 4 second to made comparation to the last
line (500000th line).
The problem is my program become so slow accessing
server after made the comparation... 

Note:
The process was so fast when I use file that only has
*several* instead of *hundreds of thousand* line,
almost immediately respond from the web server....

What could be the problem 'cousing this? 

Can some one explain to me, how this could happen? and
how to solve this problem?

Best Regards, 
Abel

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



More information about the Programming mailing list