Ticket moved from /p/gnucobol/bugs/930/ summary: VBISAM rewrite to slow --> isrewcurr rewrite to slow Priority: 5 - default --> 1
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: vbkeysio.c (ivbkeycompare,...
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 . 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...
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 . 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...
`isrewcurr` rewrite to slow
Thanks! I found that definition in isinternal.h, not ishelper.c but the edit none the less let the code build
I appreciate that it is well over a year since this was raised, I had the same issue with a 64-bit PC running Debian 11, and found the following non-portable 2-line addition to ishelper.c around line 139 worked round the problem: #ifdef WITH_LFS64 #ifdef _MSC_VER #define off_t __int64 #else /* Added this line. */ #define off_t long long /* Added this line. */ #endif #endif Not suitable as it stands for incorporation elsewhere as it only addresses 64-bit architectures in a non-Windows environment,...
I appreciate that it is well over a year since this was raised, I had the same issue with a 64-bit PC running Debian 11, and found the following non-portable 2-line addition to ishelper.c around line 139 worked round the problem: #ifdef WITH_LFS64 #ifdef _MSC_VER #define off_t __int64 #else /* Added this line. */ #define off_t long long /* Added this line. */ #endif #endif Not suitable as it stands for incorporation elsewhere as it only addresses 64-bit architectures in a non-Windows environment,...
Guess: you don't have /usr/local/lib in your default lookup paths, if you want to use it you either have to export LD_LIBRARY_PATH, adding this directory, or tell the linker to embed an rpath entry so the system knows where to look. For GnuCOBOL - I assume gcc or clang - this would mean using the following configure line: configure --with-vbisam CPPFLAGS="-I /usr/local/include" LDFLAGS="-L /usr/local/lib -Wl,-rpath=/usr/local/lib" (the first is a note for the linker where to find the link library,...
I got vbisam installed using the version on gnucobol. On install of gnucobol I get error in make. error while loading shared libraries. libvbisam.so.4 cannot open shared object file. No such file or directory. IN /usr/local/lib there is a link for libvbisam.so.4 to libvbisam.so.4.0.0 and file libvbisam.so.4.0.0 is present in /usr/local/lib. What options are there to get around this error? drop link and copy libvbisam.so.4.00 to libvbisam.so.4 OR?????
either change the functions off_t -> vbisam_off_t or use the updated and renamed one; a preview of what is to come to this site: http://inglenet.ca/Products/GnuCOBOL/vbisam-2.2.tar.Z
get the following error messages -- help!!!!! ishelper.c:147:1: error: conflicting types for 'isrelrec' 147 | isrelrec (const int ihandle, const off_t trownumber) | ^~~~~~~~ In file included from isinternal.h:123, from ishelper.c:20: ../vbisam.h:221:12: note: previous declaration of 'isrelrec' was here 221 | extern int isrelrec (const int ihandle, const vbisam_off_t trownumber); | ^~~~~~~~ ishelper.c:195:1: error: conflicting types for 'issetunique' 195 | issetunique (const int ihandle, const off_t...
And the make log.
And the make log.
ishelper.c:147:1: error: conflicting types for 'isrelrec' from make
You may want to retry with the patched version made available by Ron Norman in the GnuCOBOL discussion boards. Note: I plan to finish the conversion from CVS to SVN including Roger While's changes for 2.0 and many bugfixes added by others in 2019 (unlikely to happen before April), then update it here (if Trevor shows up) or (in case he doesn't show up) "fork" this project on GitLab and upload it there.
I try to compile vbisam 2.0 on opensuse linux 13.2 64 bit and i get the following error after i configure with --compat-cisam. Ihope someone can help ishelper.c:147:1: error: conflicting types for 'isrelrec' isrelrec (const int ihandle, const off_t trownumber) ^ In file included from isinternal.h:123:0, from ishelper.c:20: ../vbisam.h:221:12: note: previous declaration of 'isrelrec' was here extern int isrelrec (const int ihandle, const vbisam_off_t trownumber); ^**
2.0 [_WIN32]: isinternal.h - fix lseek and ssize_t redefinition
Oops ! The right fix in isclose is : if (ivbintrans == VBNOTRANS || ! (psvbptr->iopenmode & 3)) { if (ivbclose2 (ihandle)) { return -1; } ivbclose3 (ihandle); } else if (!(ivbintrans == VBBEGIN || ivbintrans == VBNEEDFLUSH || ivbintrans == VBRECOVER)) { if (ivbclose2 (ihandle)) { return -1; } } along with this fix in iscleanup function : if (psvbfile[iloop]->iisopen == 1) { becomes : if (psvbfile[iloop] && psvbfile[iloop]->iisopen == 1) { Now everything works fine, with or without transaction lo...
I am currenttly working on a large project using VBISAM. I am interested in helping to merge sources and change the function names.
I am currenttly working in a large project using VBISAM. I am interested in helping to merge sources and change the function names.
I fixed this problem by modifyng isclose function in isopen.c : if (!(ivbintrans == VBBEGIN || ivbintrans == VBNEEDFLUSH || ivbintrans == VBRECOVER)) { if (ivbclose2 (ihandle)) { return -1; } } becomes : if (!(ivbintrans == VBBEGIN || ivbintrans == VBNEEDFLUSH || ivbintrans == VBRECOVER)) { if (ivbclose2 (ihandle)) { return -1; } } else if (ivbintrans == VBNOTRANS) { if (ivbclose2 (ihandle)) { return -1; } ivbclose3 (ihandle); } If file is opened, closed, reopened then crash occurs after a lot of...
I fixed this problem by modifyng isclose function in isopen.c : if (!(ivbintrans == VBBEGIN || ivbintrans == VBNEEDFLUSH || ivbintrans == VBRECOVER)) { if (ivbclose2 (ihandle)) { return -1; } } becomes : if (!(ivbintrans == VBBEGIN || ivbintrans == VBNEEDFLUSH || ivbintrans == VBRECOVER)) { if (ivbclose2 (ihandle)) { return -1; } } else if (ivbintrans == VBNOTRANS) { if (ivbclose2 (ihandle)) { return -1; } ivbclose3 (ihandle); } Crash occurs after a lot of isread / isdelete.
By the way how can i paste in here ??? Christos
Hello from Athens every one I have compiled vbisam-2.0 on a linux box to use it to...
Hi Trevor, thanks for your reply. My C coding skills are a bit rusty. So far what...
Hi Daniel, I definitely think it's worthy of a topic, so NO problems there. Unfortunately...
I am not sure if this is worthy of a Topic, if not my appologies. But reading the...
Quoting Trevor: While I have not looked at Rogers Ver2 code in any depth, I would...
Hi Bart, It appears that you're using the isDecimal.c from my original version rather...
Hi Trevor, Thank you very much for sharing this code. I have a question about a function...
... to sleep with the fish ;=)) Call smbclient -M will be enough to give the counterpart...
PURELY joking here... You could have some FUN with your locking code which determines...
I use the 64 bit version which is the default when building the library with configure...
Thanx Jean-Michel. I hope you can understand that I wrote this stuff over 12 YEARS...
I just have a look to your original code. If prefer also your variable name style....
I'm away from my computers for a few more days yet (sending this from my phone)....
I'm away from my computers for a few more days yet (sending this from my phone)....
May be I found a solution. In vblocking.c I changed : #if ISAMMODE == 0 if (psvbptr->ttranslast...
BTW, iisindexchanged in DICTINFO is never set to 1. Here are all the lines where...
If a file is opened twice (to lock a record while inserting other ones, for example),...
The suggested change fixes isopen. I had to apply the same one at line #247 in isindexinfo...
The suggested change fixes isopen. I had to apply the same one at line #247 in isindexinfo...
The suggested change fixes isopen. I had to apply the same one at line #247 in isindexinfo...
Hmmm, weird!!!! I note that Roger added a new argement to the iVBEnter() function...
Hmmm, weird!!!! I note that Roger added a new argement to the iVBEnter() function...
<Edit> I was obviously typing the response below when you posted your second response....
I haven't played with CentOS, but at least it's a nix system (as opposed to the horrid...
Dear Trevor, BTW I use vbisam 2.0. I traced isopen execution a few minutes ago. It...
Hi Jean-Michel, You're lucky to catch me awake as it's 05:00AM Sunday here in NZ...
Dear Trevor, Thank you very much indeed for your quick answer. It seems that I accumulate...
Hi Jean-Michel, You're lucky to catch me awake as it's 05:00AM Sunday here in NZ...
I met this problem today. Here is how : All isopen use ISINOUT + ISMANULOCK + ISFIXLEN...
I met this problem today. Here is how : All isopen use ISINOUT + ISMANULOCK + ISFIXLEN...
I met this problem today. Here is how : All isopen use ISINOUT + ISMANULOCK + ISFIXLEN...
I met this problem today. Here is how : All isopen use ISINOUT + ISMANULOCK + ISFIXLEN...
Hi Ronald, It's been many YEARS since I wrote VBISAM, so I'm a little rusty on it...
Hi all, I am very interested on vbisam and want to make a contribution to the project....