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

Björnke von Gierke bvg at mac.com
Tue Apr 27 12:02:49 EDT 2010


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.

Also, make sure to not put all the xml into one field and then parse that. That would be very resource intensive! Instead, load one file, parse it, then replace it with the next file, etc.

You could have used my library to access the values of the xml files, using something similar to (see below). Tho, depending on the way you read the xml yourself, your approach could be faster, as I am using the external to read the whole xml into customproperties (and it probably was simpler anyway, as you didn't need to learn how my stuff actually works).

I'm sure you had fun
Bjoernke

PS is code:

on mouseUp --untested
  repeat for each line theLine in field "list" of stack "BvG docu"
    send "docsLibContent" && theLine to stack "docsLib by BvG"
    if the result <> true then
      put the result
      exit repeat
    end if
    if the content["unix"] of stack "docsLib by BvG" ) = true then
      put theLine & return after UnixCompatibles
    end if
  end repeat
  put unixCompatibles
end mouseUp

-- 

official ChatRev page:
http://bjoernke.com?target=chatrev

Chat with other RunRev developers:
go stack URL "http://bjoernke.com/chatrev/chatrev1.3b3.rev"




More information about the use-livecode mailing list