PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Slow initial connect to HFSQL C/S on developement machine
Slow initial connect to HFSQL C/S on developement machine
Iniciado por sdbxox, 04,nov. 2019 16:06 - No hay respuesta
Publicado el 04,noviembre 2019 - 16:06
I have recently noticed that whenever I make the first call to any table in a HFSQL C/S which is on the same laptop as the program, then there is a delay of around 4.5 seconds. During this time the application is frozen, which includes animations so even if I were to put an animated icon on or a progress bar, these are frozen until the read is completed.

I have tried running the first read on a new thread which works but then the next read has the same delay.

I have tried using HReadSeekFirst as well as native SQL and setting up a maual connection but it makes no difference. The actual server is number on the same drive so it is not an internet connection that is slowing it down.

Once the first file has been read, there is no problem as all future reads and modifications are instant, it's just this first read which is making the connection.

It only seems to be since upgrading to the lastest version unless I have just not noticed it before.

As an indication, I added this code to see what the time delay was:-

tBefore is Time
tAfter is Time

tBefore = Now()

sSqlStr is SQL Query =
[
SELECT CurrentVersion FROM Central
WHERE Ref = 1
]

HExecuteQuery(sSqlStr)

tAfter = Now()

Trace(tAfter - tBefore)

The trace shows 4607, being 4.6 seconds.

Any ideas or is this normal for a first read. If it is normal, is there a way to do it do that it does not freeze the application?

Thanks
Simon