Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse List Fill Performance

Status
Not open for further replies.

wchestnut

Programmer
Aug 9, 2010
79
US
Hello, again! Recently, I created some new Browse windows involving only a main table with one related table off of it.

My developer environment consists of a Windows XP Mode in my Windows 7 PC. Periodically, I copy the live TPS files down for fresh data to play with. When I pull up these new Browse windows in the development environment, the lists fill almost immediately.

Our file server is a NAS box. It contains a folder with the live production files that the users access.

After successfully testing the new Browse windows in the developer environment, I copied the main EXE and several related DLL files over to the production side including a DATA.DLL compiled from the Dictionary plus one of the TPS databases where I added a new field to the structure.

In the production environment, the new Browse windows appear to scan through the main table (conditional filters I have in the multi-tabbed Browse) because it takes a significant amount of time for it to display the results -- a lot more compared to the development environment. No errors are reported.

This only effects the new Browse screens in the production environment. The other order Browse lists fill filtered records virtually instantaneously.

I also backup the entire development folder on the NAS as well in a different folder. I even tried running that version and it has the same delay problem so it can't be a file I forgot to copy over. We don't have any other performance issues with our NAS, either.

Would you have any ideas?
 
Hi!

Bad Browse performance can be because of many things.

Are you using Keys and Ranges to filter your browse or just using filters?

If you are using ONLY Filters and hoping that the Filter would use an existing key, you need to be careful about the case-sensitivity of keys i.e.

If you have a key defined as KEY(MyColumn),NOCASE then because of the NOCASE attribute, the filter 'UPPER(MyColumn) = ...' would use the key but the filter 'MyColumn = ...' would not.

Need more information like table structures, browse view definition and filters used to really help you.

Regards
 
So basically I need a Key for each Filter used in a Browse list?

For example, if I Filter on:

IF TBL:Field1='Yes' AND TBL:Field4 = 0 and TBL:Field 10 = 'OH'

I would need a Key in TBL consisting of Field1, Field4, Field10 and set that in the Conditional Behavior tab, right?
 
Hi!

NO.

If your browse is already using a Key for the sort order and you have filters, having a key for each filter may not help BUT if the browse has NO key and you are using filters, having a key for the FIRST filter would help performance.

Regards
 
Hmmm... I tried what you suggested (I think) but it didn't work. I need to list all Employee Types ('EMP') in all 4 tabs. Then there is additional criteria which includes whether they are and In-House Employee (Bit) and if they have a record in another table (TOD) called 'ACALL'.

Here is what I have so far after your suggestion:

========== [FILES] ===========

Contact (CON)
ToDo (TOD)
Contact Type (CONTY)

========== [BROWSE LIST] ==========

Titles -- Last Name, First Name, Company, Type, In-House, Call
Fields -- CON:LName, CON:FName, CON:Company, CONTY:Desription, CON:InHouseEmployee, TOD:UserName

==========[ TABS ]==========

Missing Calls, All Employees, Consultants Only, In-House Only

==========[ CONDITIONAL BEHAVIOR ]==========
(No Default Behavior set)

Condition: CHOICE(?SheetTab) = 1
Key to use: CON:ByContactType
Record Filter: CON:Contact_Type='EMP' AND CON:InHouseEmployee=0 AND CLIP(LEFT(TOD:UserName))<>'ACALLS'
Range Limit Field: <empty>

Condition: CHOICE(?SheetTab) = 2
Key to use: CON:ByContactType
Record Filter: CON:Contact_Type='EMP'
Range Limit Field: <empty>

Condition: CHOICE(?SheetTab) = 3
Key to use: CON:ByContactType
Record Filter: CON:Contact_Type='EMP' AND CON:InHouseEmployee = 0
Range Limit Field: <empty>

Condition: CHOICE(?SheetTab) = 4
Key to use: CON:ByContactType
Record Filter: CON:Contact_Type='EMP' AND CON:InHouseEmployee = 1
Range Limit Field: <empty>
 
Ah-HA! I think I got it!

I created a String variable in the Data area called FilterEmployeeType, then set it's value in an Embed to equal 'EMP' for Employees.

Then I went in to each Conditional Behavior, changed the Range Limit Field to CON:Contact_Type, Single Value, then the Range Limit Value to FilterEmployeeType. Then I removed the CON:Contact_Type='EMP' in the Record Filter but left the other conditions. When I copied it to the NAS and ran it, the load time was very fast.

Was that the proper way to do it?
 
*cries*

Well, the above works except I need to sort the Browse list by Last Name, First Name. So, I created a new Record Key in the Contact table called ByEmployeeTypeLastFirstName which includes Contact_Type, LName and FName, then I changed the Key to use in the Conditional Behavior to the new Key.

When the Browse list comes up initially, it looks perfect. Only the EMP type records are listed on each Tab and the respective Record Filters appear to be working. But when I start click on different Tabs, strange things happen.

Starting on Tab 1, whenever I click on Tabs 2-4, then click back to Tab 1, I see records listed that do not have EMP set as Employee_Type. Also, after I select the InHouseEmployee checkbox field in a Contact record, the In House tab doesn't show it immediately. If I click on any other Tab, then back to In House Tab after a couple of times, the correct records are listed.

This all seems to be much harder than it should be.
 
Hi!

Looks like the Browse is NOT refreshed when you change Tabs.

Since you are using Legacy, I am bit stumped on the code to refresh the Browse, but if you know it do the following ::

On EVENT:NewSelection of the SHEET control (normally ?Sheet1 or ?CurrentTab), call the code to Refresh the Browse.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top