Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


need to speed up my Clipper application

need to speed up my Clipper application

need to speed up my Clipper application

I have a fifteen year old Clipper 5.3, Blinker 5.1 business application for 50 users in a manufacturing environment installed on a Dell NT Server over a 100Mb network purchased in 1999. The users mostly have Win 95, 98, XP, and 2000 workstations. My .dbf's typically contain 20,000 to 200,000 records and I am efficiently using Clipper .ntx files, however, users have always been complaining of slow processing speed. I have proposed to increase overall system speed by upgrading to a modern Dell Windows 2003 server and the swiches, hubs, routers, and network cards to 1Gb; I am anticipating a speed increase of up to 25% due to the modern server and an increase of up to 200% due to the faster network speed.  Of course, the owners of my company want a more significant speed increase. I don't want to buy a new application or learn a new programming language; the system is realiable and I can meet the ever-changing company requirements through daily software changes. I remember reading on this site some of the benefits of XHarbour. I am looking for a low cost, 100% compatible, reliable Clipper replacement that runs the application much quicker than is currently being used. I don't want to learn a new language and I don't want to lose any of the capabilities that I currently have. I'd appreciate your professional comments on my situation and the simplicity and reliability of transferring from Clipper to XHarbour, and I thank you for your time.


Greg Rasmussen
SoCal Apparel  

RE: need to speed up my Clipper application

Aha, a converter winky smile

xHarbour (or Harbour-project where it spun off) are very compatible (99,9%) with the original Clipper/xBase language and ecosystem.
Usually converters try to regain a new life for an old application, by dressing it up with a GUI front-end, but in this case I wouldn't advise that (yet).
First and probably most important is to get the xHarbour compiling process to work properly (start with the trial from xHarbour.com or the free package from xHarbour.org and the free Borland C compiler).
After that has worked out, see what speed improvement you have gained already big smile by now running a proper 32-bit C-compiled executable with access to all available memory, instead of the 16-bit Clipper stuff with access to limited memory (even when using Blinker).
The speed of the (x)Harbour DBFNTX RDD is already a vast improvement over the Clipper edition, and can be further enhanced by switching to the DBFCDX RDD, which is even more efficient, especially over a network.

Next it's rather important to know how you handle processing of large(r) recordsets in your app, by iterating over all of them and processing data if conditions apply, or by querying in SQL style, putting an operation to a set of records?
In the latter case, processing can be easily improved by replacing the dbf/ntx database structures by a MySQL db using the free Mediator RDD (www.otc.pl). This is a full dbf/ntx replacement RDD, that hardly needs changes in your application, unless you hard-coded file-extensions and checks like that in your source sad

Replacing the hardware is a good idea as well, as the server hardware is rather old, and improvements in newer components is evident.
When staying with the original dbf/ntx construction, the improved lan-speed should give better performance, but relieving the network from the big dataload is a much better solution.


RE: need to speed up my Clipper application

I cannot improve on Ton Hu's excellent response but only second it. He pointed me at xHarbour a couple of years back and it has done wonders for keeping legacy clipper apps alive and providing a path for improving them and making them compatible with newer OS's.

The speed improvement is excellent. I also use Mediator for db's shared over the internet with most satisfactory results, but it requires more changes to the programs to work well than just going to xHarbour, which can be configured to compile most CL 5.x source code with very minimal changes.


RE: need to speed up my Clipper application

Thanks to TonHu and Jock for your responses, BUT...
After downloading Xharbour, I wrote a "Hello world" prg and tried to compile it. No good. I don't know what directory I should be in, what my environment variables should be, what the compiling command set is, or what the linking command set is. I saw no samples on how to do even the simplist of operations. If you could please direct me to an elementary source of help, I'd appreciate it.
Until then, sailing around the Harbour is only a fantasy...


RE: need to speed up my Clipper application

Hi Greg

In addition to xharbour itself, you will also need a supported C compiler. I use the Borland C++ ver 5.5 compiler aka bcc32 command line tools (free) available from many sources. Google is your friend.

You should install that into the default directory setup (\borland\bcc55).

Also assume you have installed xharbour into its default directory. Note that the docs for xHarbour are not included in the binary download - a lot more is available in the source. They do however include make templates for compiling and linking which can be used to create your own customozed compile and link batch file.

The number of options and libraries available are many and bewildering. However, if you just want to compile clipper source in a mode compatible with Cl S/87 or 5.x you can use something like:


@echo off
REM Build script for single file xHarbour (PRG) programs
REM with implicit start procedure declaration
REM Links Multithreaded version of xHarbour libraries
REM Usage:  xhbld file
REM Do not specify PRG extension!
REM Note that your Bornand C++ 5.5 (bcc32) compiler bin folder
rem should be in your path environment variable.
REM Remember to customize XHBDIR and XHBBUILD variables!
REM set XHBDIR to the directory where HARBOUR is installed
SET XHBDIR=c:\xharbour
REM set XHBBUILD to the name of the xHarbour build (for ex. build997)
SET XHBBUILD=build1000
del %1.exe
del %1.obj
%XHBDIR%\bin\harbour %1.prg /i%XHBDIR%\include
if errorlevel 1 goto error_end

bcc32 -O2 -tWM -I%XHBDIR%\include %1.c %XHBDIR%\lib\debug.lib %XHBDIR%\lib\vmmt.lib %XHBDIR%\lib\rtlmt.lib %XHBDIR%\lib\gtwin.lib %XHBDIR%\lib\codepage.lib %XHBDIR%\lib\lang.lib %XHBDIR%\lib\rddmt.lib %XHBDIR%\lib\macromt.lib %XHBDIR%\lib\ppmt.lib %XHBDIR%\lib\dbfntxmt.lib %XHBDIR%\lib\dbfcdxmt.lib %XHBDIR%\lib\common.
lib %XHBDIR%\lib\pcrepos.lib %XHBDIR%\lib\hbsixmt.lib %XHBDIR%\lib\dbffptmt.lib

if errorlevel 1 goto error_end
echo Build OK.
goto end
echo !!!!!!!!!!!!!! ERROR IN BUILD !!!!!!!!!!!!!!!!!!!!

Note that the bcc32 line and the ones following it (list of libs) should all be on one line (couldn't get it pasted in properly).

Add the path to borland\bcc55\bin and xharbour\bin to your path variable. Put your version of this batch file in xharbour.bin as xhbld.bat or whatever and then just use xhbld program at the command line, where program.prg is the top level program you want to compile.

That should enable you to compile a hello world program.
Ultimately you will likely want to use makefiles and utilities when building larger apps, but a batch file like this is fine for compiling older code in a (mostly) compatible mode.

Hope this helps

RE: need to speed up my Clipper application

Using HBMake would help in setting up more complex scripts. HBMake has a make-like feature that it only compiles the sources that have changed, and links all objects into one executable. On most of my xHarbour projects I use it.

Use HBMake with /h option to get some help.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close