HB_NETIO help

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 2672
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 73 times
Been thanked: 24 times
Contact:

Re: HB_NETIO help

Post by mol » Thu Apr 20, 2017 6:43 pm

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?

franco
Posts: 134
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Been thanked: 1 time

Post by franco » Thu Apr 20, 2017 7:01 pm

I have removed this example as it did not relate to netio.
Franco ;)
Last edited by franco on Fri Apr 21, 2017 5:11 am, edited 3 times in total.

User avatar
mol
Posts: 2672
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 73 times
Been thanked: 24 times
Contact:

Post by mol » Thu Apr 20, 2017 7:21 pm

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.

edk
Posts: 77
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 13 times
Been thanked: 25 times

Post by edk » Thu Apr 20, 2017 7:26 pm

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.
Locutio est argentum, silentium est aureum

User avatar
Pablo César
Posts: 4013
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 99 times
Been thanked: 160 times

Post by Pablo César » Thu Apr 20, 2017 7:54 pm

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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

edk
Posts: 77
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland
Has thanked: 13 times
Been thanked: 25 times

Post by edk » Thu Apr 20, 2017 9:03 pm

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. :)
Last edited by edk on Thu Apr 20, 2017 10:05 pm, edited 1 time in total.
Locutio est argentum, silentium est aureum

User avatar
apais
Posts: 220
Joined: Fri Aug 01, 2008 6:03 pm
Location: uruguay
Has thanked: 15 times
Been thanked: 6 times
Contact:

Post by apais » Thu Apr 20, 2017 10:03 pm

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 )

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests