home Mail List
Info
Info
Meetings
Goals
Upcoming
Projects
FAQ
Security
Links

[Date Prev][Date Next] [Chronological] [Thread] [Top]

[NMLUG] Python tight loop causing massive CPU barfage


  • Subject: [NMLUG] Python tight loop causing massive CPU barfage
  • From: moegold2001 at yahoo.com (Moses Gold)
  • Date: Wed Feb 9 08:51:47 2005
  • In-reply-to: <420A148E.3070107@moriarty.k12.nm.us>


could it be worth building a flat database containing the first 1k of each
file?

--- Paul Tietjens <paul.tietjens@moriarty.k12.nm.us> wrote:

> Tim Emerick wrote:
> > have you checked out fgrep?  I've not used it but looking at the man seemed
> > to do what you are looking to do.
> > 
> > Tim
> > 
> 
> fgrep would probably work, as would a combination of find/grep/rm - and 
> we've used these.
> 
> It takes around two hours for these tools to walk through 230k files. 
> Probably related to the fact that grep/fgrep looks at the entire file - 
> where my script looks only at the first 1024 bytes.
> 
> I suppose we could make a fancier script (output first few lines, grep 
> THAT, act on matches) and that's how we ended up with this python thing. :)
> _______________________________________________
> NMLUG mailing list
> NMLUG@nmlug.org
> http://www.nmlug.org/mailman/listinfo/nmlug
> 



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page ? Try My Yahoo!
http://my.yahoo.com 



Please send sugestions and comments to webmaster@nmlug.org.
Valid XHTML 1.1! Valid CSS! Powered by Debian Powered by Apache