Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: How to free DOORS Memory
Topic Summary:
Created On: 20-Aug-2007 09:20
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 20-Aug-2007 09:20
User is offline View Users Profile Print this message


Subrojyoti Sengupta

Posts: 52
Joined: 18-Nov-2005

I am trying to export 'N' number of modules to word format. After exporting each module I am closing the module, But I could found that DOORS is not releasing the memory associated with that module.

fficeffice" />> >

In the exporting process what exactly I am doing is

> >

1)      Opening the module and getting the default view.

2)      Changing the default view to the view from which I need to extract the data.

3)      Close the module and again open it...(Default view will get effect only if we close and open the module)

4)      Now the required view gets loaded and now I export the data to word.

5)      Finally I am setting the default view which I got from the Step 1) and closing the module.

> >

I could find the memory status from the task manager which goes on growing and finally I am getting an error like 93% of memory has been used and the Script gets stopped.This memory gets freed only when in close the DOORS.

> >

Can any one suggest me a solution like how to free DOORS memory during the execution of script, like after exporting a module to word or exporting a couple of modules to word.

> >

Report this to a Moderator Report this to a Moderator
 20-Aug-2007 11:46
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Unfortunately, there is no way (at least that I know of) to free memory consumed by DOORS, hence all the threads on properly deleting Skip lists, etc.

However, closing a module should free the memory which was consumed for reading it, so there must be something else going on:

- are you sure your modules do not open additional modules, e.g. via a layoutDXL column in the default view? Those modules would not be closed by your routine

- or, do you have memory intensive stuff going on, e.g. in layoutDXL or attributeDXL, with unnecessary strings, undeleted Skip lists, etc? This might also cause memory leaks.

Regards,

Peter
Report this to a Moderator Report this to a Moderator
 20-Aug-2007 13:16
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Due to the inherent problem with DOORS releasing memory, I've found for my larger scripts that parse through a large portion of the database (some 200+ modules), it's best to split the "Run" up a little.  I do this by usint a Batch file that uses the command line entry to start DOORS, run a script then close DOORS.  Each line in the batch file calls the script, passing a specific directory.  The script will run on those 10 - 20 modules, then close.  Rinse, Repeat....lol

You can find info on the batch/command line entries in the help files.



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 20-Aug-2007 23:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Why cannot you just open the module, load the view you want, extract, then close? Opening 3 times seems hopeless. See attached.

Anyway, the problem isn't that module memory isn't released, the problem is that the exporter is string intensive and the string space isn't getting released. A great deal of wasted string-table space gets released when the DXL that uses it ends, but the sad reality of DOORS is that a lot of DXL processing will eventually cause permanant memory leak that's only released when DOORS ends.

Don't know what to do about that.

- Louie
Report this to a Moderator Report this to a Moderator
 22-Aug-2007 14:34
User is offline View Users Profile Print this message


Subrojyoti Sengupta

Posts: 52
Joined: 18-Nov-2005

Hi Louie thank you for you suggestion but can the following can be done by your suggestion of load the view instead of opening the module setting default view and closing the module and again opening  the module...

fficeffice" />> >

Open a module loop through all the objects in the module If an object has link traverse through the link and open the module and extract  attribute details for three different views .....

> >

 

Report this to a Moderator Report this to a Moderator
 23-Aug-2007 22:11
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Looks like all you want is the value of attribute 'ABC', if it exists, of objects that are targets of links. You don't need views at all. However, if you must keep the 'load(view)' stuff then this applies: you must keep track of which module is 'current'. Put a current = m_trg before the load and a current = m_src when you are done with that module.

[1] Change your 'edit' to 'read' since you don't want to open the target module exclusive, you are just going to read some data. [2] change your "O_tgt = object(targetAbsNo(lnk))" to simply "o_trg = target(lnk)". [3] I'd save all the open modules in a Skip list and then close them at the very end. Revised code is attached. [4] understand that the 'for o in m_src do' loop only consideres currently displayed objects. Since the current display is nebulous the vast majoriy of my loops find all objects in the 'entire' module and then explicitely exclude the ones I don't want, almost always excluding deleted objects. [5] probeAttr_ is the worst kept secret function and is routinely used to extract attribute values. It returns null when the attr doesn't exist, which is better than "Value = o.NameAttr" which will abort if the attribute doesn't exist for objects.

Your 'm_src = current' at the top of the script is highly desirable and should be routine for ALL scripts that deal with a current module. [1] Add some sort of "if (null m_src) {ack("Run from open module"); halt} right after it [2] there are many commands that presume the current module (such as attribute 'exists' and 'creates') and you'll need to explicitly define current if you figure to open modules along the way since the 'current' module changes rather abruptly and often unpredictably and its hard to code around without explicit 'current = ...' commands.

- Louie
Report this to a Moderator Report this to a Moderator
 24-Aug-2007 00:26
User is offline View Users Profile Print this message


Bruce Tuskey

Posts: 77
Joined: 2-Mar-2004

String manipulation is a huge memory leak in DOORS. If your scripts (or the views) are using stings (esp concatenation) use buffers instead.

If you are opening modules with display = false, the only way to get object information from a particular view, is to make it the default view.

However, if the information you need is always the same (i.e. follow links, grab specific attribute) it would be better to do it through code rather than loading views.

-------------------------
Bruce Tuskey
Sr. Principle Engineer
Tuskey@gmail.com

"All that is gold does not glitter, not all those who wander are lost:..." - Gandalf the Grey (JRR Tolkien)

Edited: 24-Aug-2007 at 00:28 by Bruce Tuskey
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.