FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour slowness
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: slowness
Posted: Wed Sep 18, 2024 08:28 AM
Tim,
Unfortunately, we have no alternatives available. It is very sad.
In my opinion some solutions there should be when Jimmy says
when DBF is used in Share Mode only Once, it will use SMB "Exlusive Locking" Mode
as soon when DBF was opened second Time it will switch into "Opportunistic Locking"
Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: slowness
Posted: Wed Sep 18, 2024 11:58 AM
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: slowness
Posted: Mon Sep 23, 2024 03:49 PM
Code (fw): Select all Collapse
@ECHO OFF

net use M: \\SERVIDOR\c /yes

M:
cd\DIRECTORY
START YOURAPP.EXE
EXIT
??

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: slowness
Posted: Tue Sep 24, 2024 08:46 PM

To All

Like Otto mentioned in one of his posts ... when I start my .EXE on a network or local app I test for the local workstation folder "C:\dbtmp" and when I write reports I always create my temp .dbf's and .cdx's on the local machine "C:\dbtmp\ ......,,dbf Order "C:\dbtmp..... .CDX and open the reports from the common network drive ... and when I am done with the report I delect the local \dbtmp files ..

I have done this for years in shared very large Novell networks and never had a speed issue ..

Rick Lipkin

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: slowness
Posted: Wed Sep 25, 2024 07:32 AM

I just noticed this topic.

And I can only share my experiences on this matter.

I also use DBF and CDX on network and on different kind of servers (Windows, Linux, NAS, ...).

It has been many years ago that I had any speed problem.

I remember the SMB2 problem on old Windows versions, but since Windows 7, I never experienced the problem again.

I have database which often are as big as 2 GB with sometimes more than 50 indexes in the CDX.

So, I get the impression that something must be wrong in the hardware is speed is a problem.

This happened to my twice, but meanwhile more than 10 years ago: a customer of mine was experiencing that my software was running very slowly. I spook about it with his PC-supplier.

Suddenly the supplier suggested to replace the motherboard of the PC, although all other software was running just fine. He replaced the motherboard and the problem was completely gone.

One year later, I had the same problem on the system of another customer. The same action solved the problem.

Just saying.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: slowness
Posted: Wed Sep 25, 2024 08:02 AM

Michel,

>often are as big as 2 GB.

I assume these are DBF files with memo fields.

If I’m right, how large are your DBF files and your FPT files?

Best regards,

Otto

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: slowness
Posted: Wed Sep 25, 2024 08:20 AM

Michel,

Did you try my sample? It demostrates that there is a problem that is not related with the specific PC or network.

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: slowness
Posted: Wed Sep 25, 2024 08:22 AM

Otto,

I never use fpt-files for memos.

In stead, I create fields of 2000 or more characters and handle like they are memos.

If a fpt-files gets corrupted, I experienced problems to open the DBF-file.

So I decided not using FPT-files anymore.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: slowness
Posted: Wed Sep 25, 2024 08:42 AM
Michel,

Did you try my sample? It demostrates that there is a problem that is not related with the specific PC or network.
The question of Enrico is This is the question of my post .

Please Michel Try this
Code (fw): Select all Collapse
#include "Dbinfo.ch"


REQUEST DBFCDX
REQUEST DBFFPT


FUNCTION MAIN()

    LOCAL nSec

    RDDSETDEFAULT( "DBFCDX" )

    SET DBFLOCKSCHEME TO DB_DBFLOCK_CL53EXT

    USE \\yourserver\yourfolder\yourdbf SHARED

    SET INDEX TO \\yourserver\yourfolder\yourcdx

    nSec = SECONDS()

    WHILE !EOF()
        SKIP
    ENDDO

    ? SECONDS() - nSec

    INKEY( 0 )

    RETURN NIL
all your experiences are very interesting but the problem is well explained in this post. As Enrico has always done, he created a minimalist example with which the problem is evident.
I have tried this in different situations. Today I hope to try again the enable Set-SmbServerConfiguration -EnableOplocks $false
Marco Boschi
info@marcoboschi.it
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: slowness
Posted: Wed Sep 25, 2024 08:54 AM
MarcoBoschi wrote:Today I hope to try again the enable Set-SmbServerConfiguration -EnableOplocks $false
Ok, keep us updated.
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: slowness
Posted: Wed Sep 25, 2024 09:03 AM
Michel,

good to hear that this works in practice as well.
I didn't even know that such large fields could be used.

But now that I'm working more with the DBF format due to the php4dbf low-level access, there really seems to be no limit here.
Thank you for sharing this idea.

I bypass the FTP issue with external files.

Have you never had problems with index files?
In the future, I also want to avoid using index files and instead create ad-hoc hashes or arrays with fields like index number and record number, and then only read those data from the DBF.
As I mentioned, I usually work with small databases. It works well and, as I believe, also quickly.

I think that if you use such large fields as you do, you have to read record by record from the disk and only take the fields you currently need to keep the payload as small as possible.

However, I have noticed almost no speed difference when I read the entire DBF and create the filter (which is practically an index) in memory, compared to reading record by record and applying the filter immediately.

Best regards,
Otto



Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: slowness
Posted: Wed Sep 25, 2024 09:04 AM

Marco,

I never have seen this line before : SET DBFLOCKSCHEME TO DB_DBFLOCK_CL53EXT

Please, can you explain this to me?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: slowness
Posted: Wed Sep 25, 2024 09:05 AM

Otto,

Thanks a lot for this info.

I'm going to have a look at it in the coming days.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: slowness
Posted: Wed Sep 25, 2024 12:01 PM

And where do I get dbInfo.ch?

It is not included in FWH?

Thx.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773