To prove my point, regarding the need to read the file from the end 
towards the beginning, I have made my version of such backward 
reading file service. Then I have created a long log file. It is 
long 120 kb and has 3678 lines. Lines I need for my calculation the 
at the most, the last 31 lines. 

When reading the file from the start:
- it takes 8 seconds to finish if I read the file line by line, 
- it takes 12 seconds if I load the complete file to the memory and 
read lines from there (interestingly, in normal programming this 
would be exactly the opposite)
- and too small to measure (under 1 sec) if I load the file to the 
memory and read the lines backwards from the last one

Regards

Davor 








Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to