Can one of you VooDoo folks please re-write these 2 functions to do the work with eval_, and thus save string table space?
I'm pretty sure I want to build the Eval_ string for each just once; and then simply execute it. If I build the string for each call then I'm wasting a lot of string table space. That may require clever global "Object" and "String" and "Buffer" variables for the 1st, and glbal "Stream" and "Buffer" for the 2nd. -Louie llandale - Wed Oct 23 11:26:18 EDT 2013 |
Re: VooDoo get attr value I am pretty sure you do not need eval_ for either of those functions. I am not sure why you use probeRichAttr_ instead of just reading the attribute value, but I am pretty sure that is the only source of waste in your code. Note that string table space is global, so it does not matter if you put it in an eval_ statement. Regards, Mathias |
Re: VooDoo get attr value Mathias Mamsch - Wed Oct 23 14:38:45 EDT 2013 I am pretty sure you do not need eval_ for either of those functions. I am not sure why you use probeRichAttr_ instead of just reading the attribute value, but I am pretty sure that is the only source of waste in your code. Note that string table space is global, so it does not matter if you put it in an eval_ statement. Regards, Mathias You say the string table is "global" for this instance of DOORS? Run a wasteful script and all subsequent scripts are affected? Well, was about to post a request for eval_ to do richTextFragment, which is very much wasting lots of space in the code as it is string only not Buffer.
-Louie |
Re: VooDoo get attr value llandale - Wed Oct 23 14:52:10 EDT 2013 You say the string table is "global" for this instance of DOORS? Run a wasteful script and all subsequent scripts are affected? Well, was about to post a request for eval_ to do richTextFragment, which is very much wasting lots of space in the code as it is string only not Buffer.
-Louie As far as I know yes. However the string table is not a huge issue until you start to put huge amounts of data in it. In this case it will also accounts for some slowdown of your DOORS interpreter. For your example code with the richTextFragment I would say, the best way to go with would be to remove the start of the RTF yourself using a few regexps and a Buffer to avoid having to put the whole module RTF in the string table. Regards, Mathias |
Re: VooDoo get attr value Mathias Mamsch - Thu Oct 24 06:58:39 EDT 2013 As far as I know yes. However the string table is not a huge issue until you start to put huge amounts of data in it. In this case it will also accounts for some slowdown of your DOORS interpreter. For your example code with the richTextFragment I would say, the best way to go with would be to remove the start of the RTF yourself using a few regexps and a Buffer to avoid having to put the whole module RTF in the string table. Regards, Mathias Wrote a function to perform richTextFragent in eval_, and yes it seems to have no advantage over the simple call. Started 2 DOORS instances, the 1st did the eval_ and the other didn't. Both show memory useage of the doors.exe (as per taskmanager) about the same. perhaps I did something wrong. -Louie
|