Menu

#235 object creation issue

v3.1
closed
nobody
Classes (182)
5
2012-08-14
2007-01-29
No

I stumbled across this bug trying to convert stems returned by rexxsql to collections. It seems to be related to creating objects while doing over a stem.

I have attached test.rex which demonstrates the problem.

It will not occur if any of the following are true:
1) change .directory~new() to anything static (i.e. 'test' or 1)
2) change the do x over stem. to do x = 1 to random(min,max)
3) if the stem is the same each time.

so it seems to be a very specific scenario:
A large stem is created, the stem is do over'ed, an object is created for each iteration of the do over. This procedure is repeated several times.
(the object doesn't even have to be assigned to anything to cause the issue)

Once the conditions are met the time required to complete the procedure will fluctuate between .5 seconds and 120 seconds. The example document uses a subroutine, procedure and routine without any measurable difference.

Discussion

  • TheDavidFactor

    TheDavidFactor - 2007-01-29

    problem example

     
  • Rick McGuire

    Rick McGuire - 2007-02-19

    Logged In: YES
    user_id=1125291
    Originator: NO

    This test program was basically a "perfect storm" of memory allocations that resulted in some very extreme memory fragmentation. During the long running intervals, the memory chains were 30000+ elements long and were continuously being searched. These changes tweak the allocations and also implements some preemptive reordering when memory starts to show fragmentation problems.

     

Anonymous
Anonymous

Add attachments
Cancel