Dear Erich,

Following the last feedback I am now rewriting my input routines.

I made a small test to see how the size of the input file works for populating a string, Mutable Buffer, Array and a classic Stem. from a file read using a stream.

As expected the Mutable Buffer performs extremely well in all situations (when I do it right…) but when I try to put the read data directly into an Array or a Stem arises as with string concatenation, I get a race (I guess) with the GC and as a result there is a gigantic slowdown for large files input. I can work around this problem by using a MB for reading the file and then converting it to an array, but when testing I found a behavior that really worries me.

With the risk of being ridiculed again I provide a test case. To emulate how I normally work I call a function defined as a procedure to open a file, read it line by line to a stem and close it again and return. 

I call this function five times in a row for small, medium and large size files. It works as expected for small and medium size input but for large size input something strange happens. The first time round it takes 50 seconds to finish. The second time it takes 50 MINUTES to finish!

I though the return from a function defined as a procedure should release all memory used? Why is this not the case here?

I have confirmed that the behavior is the same on MAC and Windows 10 for ooRexx version 5.0.0. On a W7 machine with (32-bit) ooRexx 4.2.0 it does not show this behavior at all, it finishes nicely for all cases without any slow-down.

Since the test cases are so big I have made them available again


Here is the data on my ooRexx version

Open Object Rexx Version 5.0.0
Build date: May 20 2017
Addressing mode: 64


Hälsningar/Regards/Grüsse,
P.O. Jonsson




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to