Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to improve request-file ?

From: petr:krenzelok:trz:cz at: 23-Jan-2002 6:00

Ryan Cole wrote:
> > > > load/dir %. - [[dir1/ dir/2 dir/3] [file1 file2 .... fileX]] > > Dont let that stop anybody. There is more than one way to skin a cat. > dir-split: func [contents [block!] /local blk][ > blk: copy/deep [[] []] > foreach name contents [append either #"/" = last name [blk/1] [blk/2] name] > > return blk > ] > > How fast? > > >> t: now/time loop 1000 [dir-split read %.] now/time - t > == 0:00:04 > >> length? read %. > == 79 > >> > > Thats was running on a 450 Mhz box, but still a blink of an eye even on a 100 > Mhz box. >
Hmm, then maybe I was confused because of load/read time itself. I tried some > 700 file directory on our network. Now it seems to me that 'foreach loop is only a fraction of total dir load time .... thanks a lot ... btw: I would welcome functions like split-dir (we have already split-path), clone (deep copied objects, non shared sub-objects) becoming mezzanine level functions default for everybody ... -pekr-