Page 2 of 2

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 6:43 pm
by mol
Hi Serge!
My idea is:
1. Start netio server on data server
2. Start application on terminal
3. terminal application opens all dbfs via RPC on the server
4. terminal application works to the end - on the quit it calls RPC function which closes all dbfs.

Do you think it is not good idea?

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 7:01 pm
by franco
I have removed this example as it did not relate to netio.
Franco ;)

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 7:21 pm
by mol
I've opened files only if they were requested and I closed them always. But, with new windows (from 7), opening them in network environment takes a lot of time.

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 7:26 pm
by edk
serge_girard wrote: Thu Apr 20, 2017 6:21 pm Marek,

Why would you keep dbfs open whole time? If SHARED you can not do any update.

Serge
I think because of the speed of operation, especially when doing use / close operations in a loop.
I have a system that imports documents created by mobile resellers. Every hour a few thousand documents containing tens of thousands of records are downloaded.
The procedure of updating the databases of imported documents was able to last for even a dozen minutes when the databases were opened at the beginning of the function and closed at the end. In this case, use / close operations were performed as many times as the documents was downloaded.
Since when I changed that files are opened once when opening the program and closed at the end, the import time was reduced to 20 seconds for the same amount of data.

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 7:54 pm
by Pablo César
edk wrote: Thu Apr 20, 2017 7:26 pm Since when I changed that files are opened once when opening the program and closed at the end, the import time was reduced to 20 seconds for the same amount of data.
Which it doesn't represent much... I guess when you let it open, specially when trhu internet be accessed is better to avoid letting open.

Sorry if I said something wrong on it, because I am not specialist in this.

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 9:03 pm
by edk
Pablo César wrote: Thu Apr 20, 2017 7:54 pm Which it doesn't represent much... I guess when you let it open, specially when trhu internet be accessed is better to avoid letting open.
I'm very sorry Pablo, but I don't understand you, my English is not very impressive.
From the google translator comes out mumbling.

I meant that this procedure:

Code: Select all

For nDoc=1 To 1000
   Upd()
Next

Function Upd()
Sele 1
Use db1
Sele 2
USE db2
Sele 3
Use db3

Sele 1
Append blank
Sele 2
Append blank
Sele 3
Append blank

Close 1
Close 2
Close 3
Return
will be worse (much slowest) than this:

Code: Select all

Sele 1
Use db1
Sele 2
USE db2
Sele 3
Use db3

For nDoc=1 To 1000
   Upd()
Next

Close 1
Close 2
Close 3

Function Upd()
Sele 1
Append blank
Sele 2
Append blank
Sele 3
Append blank
Return
Sorry for silly example. :)

Re: HB_NETIO help

Posted: Thu Apr 20, 2017 10:03 pm
by apais
I've opened files only if they were requested and I closed them always. But, with new windows (from 7), opening them in network environment takes a lot of time.
But when you use NETIO files are managed locally ( no network sharing ) so open and close is like you are working standalone in your desktop.

In fact you don't even have to share your dbf's folder. The only program accesing dbfs is the netio server!

And... if you compile your NETIO server under linux ( remember NETIO is a console program ) and put your dbfs on a linux native filesystem speed increases 50X ( no kidding )

Re: HB_NETIO help

Posted: Tue Sep 26, 2017 5:45 am
by mol
Hi guys!
I'm trying to search hbnetio error messages.
Do you know, where can I find what Error NETIO/1002 or Error NETIO/1004 means?

Re: HB_NETIO help

Posted: Tue Sep 26, 2017 7:17 am
by serge_girard
No idea, Marek. Maybe on google.group Harbour can help?
Serge

Re: HB_NETIO help

Posted: Tue Sep 26, 2017 7:36 am
by mol
I've read source in .C where these codes are set. But I have not read what they are meaning