I didn't miss the point at all. If you would use something like grep (or astrogrep for win32) you'd get the job done as quick or quicker. You'd also have gained knowledge on how to use another tool. Next time you were presented with a similar challenge, you'd be able to pick the correct tool.
On Apr 22, 2009, at 4:24 PM, Michael Grant wrote: > > We aren't building an enterprise app here, we're dealing with a one- > off > that's localized. If you can whip up a quick cf process in a couple > lines of > code that does the trick IMO it's better than a scalable "proper" > tool. > > Look at it this way: > > What's your boss going to prefer? The "right way" that took half a > day to > implement or the "wrong way" where you're done in 10 minutes and get > the > same result? > > Everyone seems to be missing the subjective point to argue the > objective > best practice principles of parsing a text file. > On Wed, Apr 22, 2009 at 4:18 PM, Zaphod Beeblebrox < > [email protected]> wrote: > >> >> IMHO, using an application server on a single user to parse text >> files >> is in no way quick or efficient. There are much better tools >> available to do this. >> >> >> On Apr 22, 2009, at 2:48 PM, Michael Grant wrote: >> >>> >>> I'm still going to disagree based on what Ian's details were: >>> >>> - Single user system. >>> - Scaled to "several dozens of files" >>> - 1K to 1MB ( I used a 20x larger file for my test so it's probably >>> closer >>> to 1 second to do a 1MB file) >>> - Quick and efficient. >>> >>> check, check, check and check. >>> >>> Given, if you were looking at scanning hundreds or thousands of >>> these files >>> repeatedly then perhaps DSN is the way. But for this solution I >>> think it's >>> just too bulky and way more work than is neccessary. It would take >>> longer to >>> set up a single DSN than to scan two dozen 1MB files. That's just >>> sillyness. >>> >>> On Wed, Apr 22, 2009 at 3:33 PM, Robert Munn <[email protected]> >>> wrote: >>> >>>> >>>> On Wed, Apr 22, 2009 at 12:04 PM, Michael Grant <[email protected]> >>>> wrote: >>>> >>>>> >>>>> >>>>> So 12.6 seconds to loop over a 20MB text file certainly doesn't >>>>> "choke a >>>> cf >>>>> server." I _highly_ doubt you could even set up the dsn in that >>>>> amount of >>>>> time. >>>>> >>>> >>>> If this is a one-time thing on a single-user system, your solution >>>> is fine, >>>> but it isn't going to scale. If Ian needs to perform the operation >>>> more >>>> than >>>> once, he's better off setting up a DSN and running a query. >>>> >>>> >>>> >>> >>> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:295754 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
