Topic
  • 2 replies
  • Latest Post - ‏2013-02-14T10:37:46Z by SystemAdmin
SystemAdmin
SystemAdmin
741 Posts

Pinned topic CloseProject() or CloseServer() stalls

‏2007-10-30T19:06:22Z |
Hi,

I've written a command-line utility in Visual Basic 2005 that queries ReqPro 2003.06.15.734.000 through the RPX API to produce a set of requirements metrics reports as Excel spreadsheets.

The utility accomplishes this task, except that once processing is finished, the Reqpro40.Application object takes a long time to close its connection (at the call to CloseProject below). It seems the more documents I query (e.g. about 6100 requirements in 11 documents), the longer it takes to close the connection, to the point that it appears to be stalled and my user has to kill the application process.

The relevant code appears in the following snippet:

code
Option Explicit On
Imports ReqPro40
Imports ReqPro40.enumOpenProjectOptions
Imports ReqPro40.enumProjectFlags
Imports ReqPro40.enumProjectLookups

Module ReqProReportTool

Public Sub Main()

Dim rpApp As New Application
Dim rpProject As Project
Dim ipdsMetricsReport As ReqMetricsReport

rpProject = GetProject(rpApp)

ipdsMetricsReport = New ReqMetricsReport(rpProject)

rpApp.CloseProject(rpProject, eProjLookup_Object)
rpApp.CloseServer()
rpApp = Nothing
End Sub

(other Subs...)

End Module
[/code]

The program starts out at about 30Mb memory usage as reported in the Task Manager. As it runs, the program creates a new VB object for each document, then a new VB object for each applicable requirement in the document, after some filtering on requirement and document properties. Memory usage for the program's process goes up to about 376 Mb during the requirements processing in this case for approx 6100 requirements.

Once processing is finished and the program hits the CloseProject() call, memory starts decrementing a few 10's of Ks at a time, almost as if the ReqPro server is closing down the connection one requirement object at a time! I don't know how to confirm this through the API, or whether it's poor application design on my part in the way I use the ReqPro objects through the API.

Any suggestions as to how I might debug or resolve this problem would be appreciated.

Regards,

Philip Steiner
Updated on 2013-02-14T10:37:46Z at 2013-02-14T10:37:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    741 Posts

    Re: CloseProject() or CloseServer() stalls

    ‏2009-02-05T23:06:04Z  
    I've been having the exact same issue so thanks for your post because I wouldn't have looked at the mem usage. I have an open trouble ticket but IBM is already hinting they can't support it. I have found that closeProject, setting the reqPro app object = nothing and sweep method will start the memory de-allocation but its really really slow. Did you ever resolve this?
  • SystemAdmin
    SystemAdmin
    741 Posts

    Re: CloseProject() or CloseServer() stalls

    ‏2013-02-14T10:37:46Z  
    I've been having the exact same issue so thanks for your post because I wouldn't have looked at the mem usage. I have an open trouble ticket but IBM is already hinting they can't support it. I have found that closeProject, setting the reqPro app object = nothing and sweep method will start the memory de-allocation but its really really slow. Did you ever resolve this?
    I face problems with the closeserver method, it does not work.

    The closeproject method works with the callback (Rqcallback class) object as parameter, but not without.

    This might be an issue for the ReqPro Team, maybe the closeserver method has to be rewritten, so that it uses the callback ?