Richmond goes data-mining (a.k.a. shovelling through the sh..)

Richmond Mathewson richmondmathewson at gmail.com
Tue Apr 27 13:46:52 EDT 2010


  On 27/04/2010 19:02, Björnke von Gierke wrote:
> On 27 Apr 2010, at 17:46, Richmond Mathewson wrote:
>
>>   I have a feeling the way I went about it was
>> extremely and unnecessarily long-winded.
>
> Yes.
>
> My stack loads all the docu stacks into memory, and _tries_ to unload them again. However, that fails sometimes, due to the build in docu using the stacks etc. So maybe the big resource usage you mentioned in the orignal mail, could be due to that.

I loaded each XML file individually.

My "long-winded" referred to my code:

on mouseUp
    put empty into fld "FLIST"
    answer folder "Choose a folder to process"
    set the defaultFolder to it
    put " " into PropName3
    put the files into fld "FileList"
    wait 40 ticks
    ----------------------------
    put "fish" into PhileName
    put "fish" into fld "PhileName"
    put 1507 into KOUNT
    put KOUNT into fld "KOUNT"
    put 1 into XOUNT
    wait 40 ticks
    ----------------------------
    repeat until PhileName contains "index"
       add 1 to KOUNT
       put KOUNT into fld "KOUNT"
       put line KOUNT of fld "FileList" into PhileName
       put line KOUNT of fld "FileList" into fld "PhileName"
       wait 40 ticks
       if PhileName contains "index" then
          exit repeat
       else
          set the useUnicode to true
       set the RTFText of fld "EXEMEL" to URL ("file:" & PhileName)
       put line 1 of fld "EXEMEL" into PropName1
       repeat with KK = 1 to 13
       delete the first char of PropName1
    end repeat
      repeat
       put the first char of PropName1 into PropName2
       if PropName2 contains "<" then
          exit repeat
       else
          put PropName3 & PropName2 into PropName3
       end if
        delete the first char of PropName1
    end repeat
       put PropName3 into line KOUNT of fld "PropName"
    if fld "EXEMEL" contains "unix support=" & quote & "true" then
       --do nix--
    else
       add 1 to XOUNT
       put PropName3 into line XOUNT of fld "FLIST"
       --put PropName3 && PhileName into line XOUNT of fld "FLIST"
       save this stack
    end if
    put " " into PropName3
    end if
    end repeat
    -----------------
end mouseUp

fairly pedestrian, nicht?

not the freezing of the RunRev IDE - that was clearly something to do 
with file 1507 ( = 3011.xml)
gumming up the works; as I don't pretend to understand XML I won't 
attempt any solutions to that
one.



More information about the use-livecode mailing list