xbrowse slow

Re: xbrowse slow

Postby Marc Venken » Sat Mar 18, 2017 10:42 am

I also wonder if the function :

FW_CdxCreate() // creating all indexes on all fields

will slow down a application because many tags are open? ( lets say until 20/30 tags ?)

For my kind of programming, it would be good, because i always have the bad habbit of creating some extra index's before some program loops
because I'm never shure that the base-index created before will be correct. (it probably is) since CDX if only 1 file.

Habbit from the NTX time (extra .ntx to open)

A Cdx is always update if changes are made by : Xbrowse, changes by Loops, Packs ?

On witch point do you use a Reindex function ?
Marc Venken
Using: FWH 16.11 with Harbour
Marc Venken
 
Posts: 245
Joined: Tue Jun 14, 2016 7:51 am

Re: xbrowse slow

Postby nageswaragunupudi » Sat Mar 18, 2017 11:39 am

You are already using locals in your program. That is right.
You are using alias for all functions and references to the field. That is a good and healthy practice. Please continue the way you are doing.

You may use field declaration and avoid aliasing ONLY in INDEX and FILTER expressions.
In all other code please continue the way you are doing and that is good.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 5248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse slow

Postby nageswaragunupudi » Sat Mar 18, 2017 11:51 am

FW_CdxCreate( [<cfieldlist>] )

Creating index on all fields is not necessary. This may result in very large cdx files and slow down on networks. Better you create index on fields that are necessary for seeks and filters. ( Filters are optimized when the fields involved are indexed)

If you specify fieldlist, you do not need to specify UPPER(), because the function automatically adds upper clause for character fields. You need to include "DELETED" in the list if you want index on DELETED()

We regret that we are not able to keep the manuals / Wiki uptodate.

But we do mention every new functionality in whatsnew.txt. That is good starting point for reference.
If you need more details of the functionality you can refer to the source code in the prg file. This helps to understand the function better as well as we learn a few hints on good programming.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 5248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse slow

Postby Marc Venken » Sat Mar 18, 2017 2:06 pm

Thank You very much for the very usefull info.
Marc Venken
Using: FWH 16.11 with Harbour
Marc Venken
 
Posts: 245
Joined: Tue Jun 14, 2016 7:51 am

Re: xbrowse slow

Postby artu01 » Tue Mar 21, 2017 4:12 am

Mr. Rao
I'm using CDX
As I said the xbrowse is slow only when I use this code
Code: Select all  Expand view

      oBrw:lIncrFilter := .t.
      oBrw:lSeekWild := .t.
      oBrw:cFilterFld := "RUC"
 



Thank you for your help
fwh 13.01, harbour 3.2.0, pelles C, bcc582
artu01
 
Posts: 190
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 8 guests