Thank you for the test program. Can you please adjust TESTRW so that it has no screen section or any CALLs? That makes this more easy to check/debug and also removes the additional overhead from curses.
Last edit: Simon Sobisch 2023-11-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As 98.6 of the instructions are spent in the VBISAM function isrewcurr(), this isn't a gnucobol issue, so I've moved it to the relevant project tracker.
Also note that this bad performance is related to the many alternate keys with split keys. In other cases the performance would be better.
I only did a minor adjustment as follows:
vbkeysio.c (ivbkeycompare, sort_retrun): refactored for improved performance
@juanc Please try to swap the existing ivbkeycompare function with the following and check for differences in execution time. Warning: I've not run any tests but 1 a minute program run, I even did not verify if the result is still identical, so: use with care, run at least make checkall within GnuCOBOL to verify you don't get any new errors).
flamegraph generated by hotspot after the change attached (before the change ivbkeycompare() took > 60 of the process total, that is now down to 46%) .
Test Results
GNUCOBOL 3.2 WITH BDB
real 0m5,873s
user 0m5,643s
sys 0m0,074s
GNUCOBOL 3.2. WITH VBISAM
real 1m24,979s
user 1m21,339s
sys 0m3,608s
MF II V 1.1 WITH C-ISAM
real 0m3.205s
user 0m1.564s
sys 0m1.596s
Thank you for the test program. Can you please adjust TESTRW so that it has no screen section or any
CALL
s? That makes this more easy to check/debug and also removes the additional overhead from curses.Last edit: Simon Sobisch 2023-11-12
As 98.6 of the instructions are spent in the VBISAM function
isrewcurr()
, this isn't a gnucobol issue, so I've moved it to the relevant project tracker.Note: sources for my test taken from http://inglenet.ca/Products/GnuCOBOL/vbisam-2.2.tar.Z, run with GnuCOBOL 3.2, bot compiled with
-ggdb3 -O1
.Also note that this bad performance is related to the many alternate keys with split keys. In other cases the performance would be better.
I only did a minor adjustment as follows:
@juanc Please try to swap the existing ivbkeycompare function with the following and check for differences in execution time. Warning: I've not run any tests but 1 a minute program run, I even did not verify if the result is still identical, so: use with care, run at least
make checkall
within GnuCOBOL to verify you don't get any new errors).flamegraph generated by hotspot after the change attached (before the change
ivbkeycompare()
took > 60 of the process total, that is now down to 46%) .Last edit: Simon Sobisch 2023-11-12
Ticket moved from /p/gnucobol/bugs/930/
isrewcurr
rewrite to slowLast edit: Simon Sobisch 2023-11-12