PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Slow initial connection to HFSQl on same machine
Slow initial connection to HFSQl on same machine
Iniciado por sdbxox, 04,nov. 2019 16:11 - 3 respuestas
Publicado el 04,noviembre 2019 - 16:11
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 run on the same drive as the application 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
Publicado el 25,junio 2020 - 03:32
Hi Simon,

Did you ever get a resolution to this problem.

I have the same issue.

Thanks
Peter
Publicado el 25,junio 2020 - 03:32
Hi Simon,

Did you ever get a resolution to this problem.

I have the same issue.

Thanks
Peter
Publicado el 25,junio 2020 - 12:50
if you have a connection to a DB defined in the analysis (your test DB, by example) and that DB is NOT accessible while starting the program, you will have this kind of symptoms....

The solution is to remove that connection from the analysis before creating the public facing executable, -OR- to be rid of it entirely, and just rely on the hconnexion function.