Kickassjoe Posted February 23, 2008 Posted February 23, 2008 I am currently faced with the problem of speed. I need to sort through a 3743 line text file every 3 seconds or so... but when a piece of information being searched for is at the end of the text file, it often takes more than 10 seconds, sometimes almost 20. Should I put the text file into an array when I load the script, would that make it any faster? Or is there another way that I could make searching through a large text file faster? What goes around comes around... Payback's a bitch.
rasim Posted February 23, 2008 Posted February 23, 2008 (edited) Hi! Works with large text file used arrays not a good idea. See aside sed, gsar, egrep utilites. Edited February 23, 2008 by rasim
randallc Posted February 23, 2008 Posted February 23, 2008 I am currently faced with the problem of speed. I need to sort through a 3743 line text file every 3 seconds or so... but when a piece of information being searched for is at the end of the text file, it often takes more than 10 seconds, sometimes almost 20. Should I put the text file into an array when I load the script, would that make it any faster? Or is there another way that I could make searching through a large text file faster?Hi,if you know it is at the end, load, say the last 10 or 100 linnes or whatever only; use "TailRW" link from my signature; if it can be anywhere in the file, , then you are stuck..Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now