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";

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to