![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: better to delete skip list or nullify entries? Topic Summary: better to delete skip list or nullify entries? Created On: 6-Jun-2006 13:01 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: I would tend to delete and re-create mainly because I tend to be very cautious when it comes to memory handling in DXL. My basic ethos is to delete anything I can when I can and keep the memory footprint as small as possible | |
![]() |
|
I need to populate a skip list based on the results of a choice menu.
Is it better to delete the skip list and recreate it each time or set each entry to null and then repopulate? TIA!! ------------------------- Heather Linsk Lead Engineer General Dynamics AIS 413-494-7095 |
|
![]() |
|
![]() |
|
I would tend to delete and re-create mainly because I tend to be very cautious when it comes to memory handling in DXL. My basic ethos is to delete anything I can when I can and keep the memory footprint as small as possible
------------------------- Graham Stradling, Alcatel-Lucent. |
|
![]() |
|
![]() |
|
Does it make a difference if the skip list is a global variable and I am deleting and recreating it within a function?
------------------------- Heather Linsk Lead Engineer General Dynamics AIS 413-494-7095 |
|
![]() |
|
![]() |
|
I don't see a difference whether its a global or local Skip. I'm not sure what you mean by "null" each entry. Perhaps you mean "delete" each entry. I'd be hesitant to have a Skip loop that deletes each entry:
for Data in skp do { Key = (string key skp) delete(skp, Key) } You cannot do that with Links or Baselines since it screws up the outer loop, but maybe it would work for a Skip list. If this DOES work consistently it MAY have a performance improvement over a simple delete-and-create, but if it did it would take thousands of iterations to save any human-noticeable time. Just delete and recreate it. - Louie PS. I DO see a noticeable improvement when dealing with Buffers: many of my functions declare a "global" buffer used only by that function. Buffer glBufAccess = create(). The first assignment to the buffer is with "=", subsequent use "+=". I DO see a big performance improvement over the natural method of declaring and creating the Buffer at the top of the function, and deleting it at the bottom. Yes, this method leaves the buffer in tact and taking up some memory, but that's not really very much memory. I also see a DRASTIC imprment in declaring my Regular Expression globally, rather than in the function that uses it. The "RegExp re = regexp(etc)" construct seem to take an enourmous amount of time to interpret. |
|
![]() |
|
![]() |
|
Louie,
Have you seen the same performance degradation with "matches" as with "regexp"? Thanks, Shawn ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
Turned this thread up looking for information about a similar problem.
I have a script with the following structure Skip ListData // declare variable Loop Until Done create ListData // Creates an empty skiplist each pass of loop. Do things to load skip list and use the data Next Loop delete ListData // Delete skip list after exiting loop. Question is am I leaking memory or is the existing skip list just reconstructed each time? No problem with the script, that does what I want. I am sure I got the idea from some Telelogic script. Edited: 27-Jul-2007 at 12:11 by Peter Seager |
|
![]() |
|
![]() |
|
I have noticed that creating a regexp takes a huge amount of time. If you are checking 1000 requirements to see which contain 'shall' you'll notice an improvement in time if you define the regexp as global outside the function, rather inside the function:
Regexp reHasShall = regexp([S|s][H|h][A|a][L|l][L|l]) bool fHasShall(string Text) { return reHasShall Text) } - Louie |
|
![]() |
|
![]() |
|
A previous test showed that when you create the skip inside the loop after failing to delete it, the create appears to act as if it was created; specifically the old values are not in the Skip.
The attached code shows the dramatic difference between correctly deleting a skip inside the loop that creates it, compared to waiting until after the loop. It takes zero seconds to complete when you confirm delete inside the skip, but takes 60 seconds if you do not confirm. Conclusion: delete Skips (et tal) in the same context that you create them. - Louie PS. The delay appears to be somewhat exponecial; 60 seconds for 50,000 loops but 250 for 100,000. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.