Hot Topic (More than 10 Replies) Sesame ver 2.6.2 (Read 3871 times)
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Sesame ver 2.6.2
Sep 26th, 2016 at 3:33pm
Print Post Print Post  
We installed the new version of Sesame (client/server) last week and one of our applications has slowed down by a factor or 2 or 3.  All other applications appear to be working fine.  Any help would be appreciated.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #1 - Sep 26th, 2016 at 4:01pm
Print Post Print Post  
We'll need a few clues. What does this application do that the others do not?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #2 - Sep 26th, 2016 at 7:35pm
Print Post Print Post  
The application populates all customer outstanding invoices. You have the ability to post payment for a particular invoices(s) that will create a new record for same. On the initial start of the application the information populates very slow and once a payment is posted the re-population is slow as well.  Hopefully this will be of some help.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #3 - Sep 26th, 2016 at 7:44pm
Print Post Print Post  
You mentioned that one application is running slowly and that the others are not. Are any of these actions you describe above unique to this application? If so, please be specific. How is the information being populated? How is the payment being posted? Are there any actions that populating and the posting have in common?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #4 - Sep 26th, 2016 at 8:57pm
Print Post Print Post  
All the actions are unique to this application.  The application upon launch first populates then when we push the command button modifies an existing record(s) as well as creates a new record.

  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #5 - Sep 26th, 2016 at 9:16pm
Print Post Print Post  
I assume that it does this via some SBasic programming. I am trying to determine which SBasic commands or techniques are affected and will need to be tested. There are lots of ways to populate and create records.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #6 - Sep 27th, 2016 at 12:49pm
Print Post Print Post  
Below is the code, thank you.

var vQuit as Int
var vErr as Int
var vLine as String
var vArray as String
var vLen as Int
var n as Int
var n2 as Int
var e as Int
var vCount as Int

//Posting vars
var vInvoice as String
var vInvoices as String
var vAcct as String
var vAccts as String
var vMisc as String
var vMiscValues as String

var vCheckNo as String
var vTransDate as Date
var vManTransDate as String
var vDay as String
var vDatePosted as Date
var vDOW as String
var vTime as Time
var vType as Int
var vTransNo as String
var vName as String
var vTotalPayment as Double
var vMonitor as Double
var vService as Double
var vInstall as Double
var vAcctNo as String

var vAmount as Double
var vAmt as String
var vAmts as String

var vRSID as Int
var vRSID2 as Int
var vRSID3 as Int
var vLocked as Int

var vRevisedBalance as Double
var vCopyWriteLn as String
var vCheckOrCredit as String
var vResult as Int
var vSubject as String
var vMsg as String
var vReturn as Int
var vTotalItemsPosted as Int

If (Check# = "") and (Use Credit Card <> 1)
{
@Msgbox("Check# was not supplied and 'Use Credit Card' isn't checked.","","Please specify one or the other.")
vQuit = 1
ThrowFocus(Check#)
}


If Use Credit Card = 1
{
If (CC Num = "") Or (CC Exp = "") Or (CtrlNo = "")
{
@Msgbox("If using credit card, Card Number, Exp Date and Ctrl# are required.","","(Ctrl# is the Authorization Code)")
vQuit = 1
}
}

If vQuit = 0
{
For n = 1 to 20

If (@("Acct" + n) <> "") Or (@("Name" + n) <> "") Or (@("Invoice" + n) <> "") Or (@("Amount" + n) <> "")
{
vLine = @("Acct" + n) + ";" + @("Name" + n) + ";" + @("Invoice" + n) + ";" + @("Amount" + n)

If (@Instr(vLine, ";;") > 0) Or (@Left(vLine, 1) = ";") Or (@Right(vLine, 1) = ";")
{
@Msgbox("There's missing data in the grid. Please correct.","","")
vQuit = 1
}
}
Next
}

If vQuit = 0
{
If Payor = ""
{
@Msgbox("'Payor Name' hasn't been supplied.","","")
vQuit = 1
ThrowFocus(Payor)
}
If AcctNo = ""
{
@Msgbox("Payor 'AcctNo' field is empty.","","")
vQuit = 1
ThrowFocus(AcctNo)
}
}

//Find duplicate items in grid
If vQuit = 0
{
For n = 1 to 20

If @("Acct" + n) <> ""
{
vLine = @("Acct" + n) + "^" + @("Name" + n) + "^" + @("Invoice" + n) + "^" + @("Amount" + n)
vArray = @AppendStringArray(vArray, vLine)
}

Next

vLen = @Len(vArray)
vArray = @UniqueStringArray(vArray)

If @Len(vArray) <> vLen
{
@Msgbox("You have a duplicate entry in the grid.","","Please clear the duplicate entry and try again.")
vQuit = 1
}
}

If vQuit = 0
{
If @Askuser("Post this check/payment to DR and pay down the specified invoice(s)?",@NL() +
"(Note: If the posted record is in use and therefore locked, you will"," have to manually apply the payment to it.)")
{
// Service invoices have a '-I' or '-S' suffix which must be stripped off

//Add new record to DR first

//Get list of Invoice Nos
For n = 1 to 20

If @("Invoice" + n) <> ""
{
     vInvoice = @("Invoice" + n)
     vInvoice = @Replace(vInvoice, "-S", "")
     vInvoice = @Replace(vInvoice, "-I", "")
     
     vInvoices = @AppendStringArray(vInvoices, vInvoice)
     
     vAcct = @("Acct" + n)
     vAccts = @AppendStringArray(vAccts, vAcct)
     
     vAmt = @("Amount" + n)
     vAmts = @AppendStringArray(vAmts, vAmt)
     
     
     if vAcct <> "" and vAmt <> ""
     {
           if vInvoice <> ""
           {
                 vMiscValues += vAcct + "-" + vInvoice + " [" + @AsFormattedByLE(TotalBalanceDue, 0, vAmt) + "]; "
           }
           else
           {
                 vMiscValues += vAcct + " [" + @AsFormattedByLE(TotalBalanceDue, 0, vAmt) + "]; "
           
           }
           
     }
           
}

Next

vMiscValues = @Replace(vMiscValues, "Monitor", "CS")
vMisc = "Paying: " + @TrimStringRight(vMiscValues,"; ")

// Create new DR record ###########################################

vAcctNo = AcctNo
vCheckNo = Check#

     If @Lt(vCheckNo, 3) <> "ACH"
     {
     vTransDate = "2099/01/01"
     }
     else
     if @Lt(vCheckNo, 3) = "ACH"
     {

           if @askuser("Do you wish to manually enter the Transaction Date?","","")
           {
           vManTransDate = @Calendar("", "Choose Transaction Date [Esc to Cancel]")
                 If Not @Error
                 {
                 vTransDate = vManTransDate
                 vCheckNo = vCheckNo + "-P"            
                 }
           } // end if @askuser("Do you wish to manually enter the Transaction Date?","","")            
           else if vTransDate = ""
           {
                 If @Int(@Dow(@ServerDate())) = 5 //Friday
                 {
                 vTransDate = @TD(@ServerDate()) + 3
                 }
                 Else If @Int(@Dow(@ServerDate())) = 6 //Saturday
                 {
                 vTransDate = @TD(@ServerDate()) + 2
                 }
                 Else if (@Int(@Dow(@ServerDate())) <> 5 and @Int(@Dow(@ServerDate())) <> 6)
                 {
                 vTransDate = @TD(@ServerDate()) + 1
                 }
           } // end else if vTransDate = ""
           
     } // end if @Lt(vCheckNo, 3) = "ACH"

vDay = @DOW$(vTransDate)
vDatePosted = @ServerDate()
vDOW = @Dow$(vDatePosted)
vTime = @TT(@ServerTime())
vType = "1"
vName = Payor
vTotalPayment = Total Paid
vMonitor = Monitor
vService = Service
vInstall = Install
vTransNo = @Int(@GlobalValue("gvDR@Num")); GlobalValue("gvDR@Num", @Int(vTransNo) + 1)

vRSID = @XResultSetSearch(@FN, "DR", 0, 2, "!Transaction#==")

If vRSID > -1
{
XResultSetCreateNewRecord(vRSID)
XResultSetValue(vRSID, "Transaction Date", vTransDate)
XResultSetValue(vRSID, "Day", vDay)
XResultSetValue(vRSID, "Date Posted", vDatePosted)
XResultSetValue(vRSID, "DOW", vDOW)
XResultSetValue(vRSID, "Time1", vTime)
XResultSetValue(vRSID, "Type of Transaction", vType)
XResultSetValue(vRSID, "Transaction#", vTransNo)
XResultSetValue(vRSID, "CheckNo", vCheckNo)
XResultSetValue(vRSID, "Name", vName)
XResultSetValue(vRSID, "Total Payment Received", vTotalPayment)

if @Lt(Check#, 3) = "ACH"
{
XResultSetValue(vRSID, "BankNo", "CREDIT-ACH")
XResultSetValue(vRSID, "Bank Name","Electronic Funds Transfer")
}

If Use Credit Card = 1
{
XResultSetValue(vRSID, "BankNo", "CREDIT-ACH")
XResultSetValue(vRSID, "Bank Name", CC Num + " " + CC Exp)
XResultSetValue(vRSID, "CheckNo", CtrlNo)


If @Int(@Dow(@ServerDate())) = 5 //Friday
{
XResultSetValue(vRSID, "Transaction Date", @TD(@ServerDate()) + 3 )
XResultSetValue(vRSID, "Day", @Dow$(@TD(@ServerDate()) + 3 ))
}
Else If @Int(@Dow(@ServerDate())) = 6 //Saturday
{
XResultSetValue(vRSID, "Transaction Date", @TD(@ServerDate()) + 2 )
XResultSetValue(vRSID, "Day", @Dow$(@TD(@ServerDate()) + 2 ))
}
Else
{
XResultSetValue(vRSID, "Transaction Date", @TD(@ServerDate()) + 1 )
XResultSetValue(vRSID, "Day", @Dow$(@TD(@ServerDate()) + 1 ))
}

}

If vMonitor > 0 Then XResultSetValue(vRSID, "Monitor", vMonitor)
If vService > 0 Then XResultSetValue(vRSID, "Service", vService)
If vInstall > 0 Then XResultSetValue(vRSID, "Install", vInstall)

// 07/25/13: this line modified to below due to vervbiage 'Monitor' post in the Misc field XResultSetValue(vRSID, "Misc_Inv No", vMisc)
If vMisc <> "Monitor"
{
XResultSetValue(vRSID, "Misc_Inv No", vMisc)
}

XResultSetValue(vRSID, "AcctNo", vAcctNo)

XResultSetClose(vRSID)
}
Else
{
@Msgbox("Unable to create DR payment receipt record.","","")
}
//#################################################################

//Update Service/Install & Monitor invoices & their parents #######


For n = 1 to 20

If @("Acct" + n) <> ""
{
vAcctNo = @("Acct" + n)
vInvoice = @("Invoice" + n); vInvoice = @Replace(vInvoice, "-S", ""); vInvoice = @Replace(vInvoice, "-I", "")
vAmount = @TM(@("Amount" + n))

vRSID = @XResultSetSearch(@FN, "Customers", 0, 2, "!NUM=" + @TN(vAcctNo))

If vRSID > -1
{

If @XResultSetLocked(vRSID) = 1
{
WriteLn("Customer Acct# " + @Int(vAcct) + " record was locked and could not be updated." + @NL() + "You will need to manually update the customer's record.")
RESIZE()
vLocked += 1
}
Else
{

     If vInvoice = "Monitor"
     {
     vRSID2 = @XResultSetSubset(vRSID, "CS Invoice")
     vCount = @XResultSetTotal(vRSID2)
     XResultSetSort(vRSID2, "Inv Date:-1")

     //Find oldest Monitor invoice with a balance due
     For e = 1 to vCount

     XResultSetCurrentPosition(vRSID2, e)

     If @TN(@XResultSetValue(vRSID2, "Balance")) > 0
     {
     XResultSetValue(vRSID2, "Pmt Amt", vAmount)
     XResultSetValue(vRSID2, "Pmt Date", @TD(@ServerDate()))
     XResultSetValue(vRSID2, "Balance", @TM(@XResultSetValue(vRSID2, "Balance")) - vAmount)
     //Kill loop cuz we're done
     e = vCount + 1

     //Update Parent
     XResultSetValue(vRSID, "CS Balance", @TM(@XResultSetValue(vRSID, "CS Balance")) - vAmount)
     XResultSetValue(vRSID, "Balance Due", @TM(@XResultSetValue(vRSID, "Balance Due")) - vAmount)
     }

     Next

     XResultSetClose(vRSID2)
     }

     Else // it's a Service invoice
     {

     vRSID2 = @XResultSetSearch(@FN, "Customers!Service", 0, 2, "!Invoice #=" + vInvoice)

     // Add new Payments record and make it a Service record child
     vRSID3 = @XResultSetSubset(vRSID2, "Payments")
     XResultSetCreateNewRecord(vRSID3)
     XResultSetValue(vRSID3, "Payment", vAmount)
     XResultSetValue(vRSID3, "Date1", @TD(@ServerDate()))
     XResultSetValue(vRSID3, "Invoice", vInvoice)
     XResultSetValue(vRSID3, "Acct", vAcctNo)      
     
     XResultSetReparent(vRSID2, "Payments", vRSID3)

     XResultSetClose(vRSID3)

     XResultSetValue(vRSID2, "Amt Paid", vAmount)
     XResultSetValue(vRSID2, "Service Due", @TM(@XResultSetValue(vRSID2, "Service Due")) - vAmount)
     XResultSetValue(vRSID2, "Invoice #", vInvoice)

     XResultSetClose(vRSID2)

     //Update Parent      
     XResultSetValue(vRSID, "Service Balance", @TM(@XResultSetValue(vRSID, "Service Balance")) - vAmount)
     XResultSetValue(vRSID, "Balance Due", @TM(@XResultSetValue(vRSID, "Balance Due")) - vAmount)      
     }

} // End If record wasn't locked

XResultSetClose(vRSID)

} // End If VRSID > -1

} // End If @("Acct" + n) <> ""

Next

//#################################################################

If vLocked = 0
{

For n2 = 1 to 20 // this routine to count the number of line items
If @("Acct" + n2) <> "" then vTotalItemsPosted += 1
Next

     If @lt(Check#,3) = "ACH"
     {
     FileDelete("c:\sesame2\ACHPosting.html")      
     vResult = @PrintAFormToHTML("c:\sesame2\ACHPosting.html") 

           If vResult = 0
           {
           Writeln("Error: Failed to create document to email.")
           RESIZE()
           }      
           if vResult = 1
           {
           vSubject = "ACH Transfer posted"
           vMsg = "c:\blat\blat.exe c:\Sesame2\Docs\ACHTransfer.txt -f admin@aronsonalarm.com -t andy@aronsonalarm.com -subject " + @chr(34) + vSubject + @chr(34) + " -server mail.aronsonalarm.com:587 -u mark@aronsonalarm.com -pw aron15330 -hostname AronsonEmailer -log c:\blat\blat.log -timestamp -attach c:\sesame2\ACHPosting.html"
           FileOverWrite("C:\Sesame2\Email.bat", vMsg)
           vReturn = @RedirectProcess("cmd /C C:\Sesame2\Email.vbs", "")            
     
           if vReturn = 0
           {
           @MsgBox("ACH Email sent successfully.", "", "")
           }
           else
           {
           @msgbox("Email send failed","","")
           }

           FileDelete("c:\sesame2\ACHPosting.html")
           }

     } // end If @lt(Check#,3) = "ACH"

vRevisedBalance = TotalBalanceDue - Total Paid

if Check# <> ""
{
vCheckOrCredit = "Check no: " + Check#
}      
else
{
vCheckOrCredit = "Credit card ctrl no: " + CtrlNo
}

vCopyWriteLn = vCheckOrCredit + " successfully posted. Account record(s) updated." + @NL() + @NL()
             + vTotalItemsPosted + " line item(s) posted totaling " + @AsFormattedByLE(TotalBalanceDue, 0, Total Paid) + @NL() + @NL()    
          + "New starting balance: " + @AsFormattedByLE(TotalBalanceDue, 0, vRevisedBalance) + @NL() + @NL()

SetCopyBuffer(vCopyWriteLn)
RESIZE()
vCopyWriteLn += "This information has been copied to clipboard. This Window will self close."


WriteLn(vCopyWriteLn)
ForceRedraw()

CLEAR_ALL()
REFRESH_LIST()

Loiter(3000)
CLS()
CloseSlate()
ReadOnly(Check#, 0)
vTotalItemsPosted = ""
} // end If vLocked = 0

// Next 3 lines remmed on 10/05/14.  Moved same to allow screen refresh while the slate loiters for 3 seconds.
// vTotalItemsPosted = ""
// CLEAR_ALL()
// REFRESH_LIST()

} // End If @Askuser

} // End If VQuit = 0

  
Back to top
 
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #7 - Sep 27th, 2016 at 12:53pm
Print Post Print Post  
CLEAR_ALL Subroutine

SUBROUTINE CLEAR_ALL()

var n as Int

For n = 1 to 20

Clear(@("Acct" + n))
Clear(@("Name" + n))
Clear(@("Invoice" + n))
Clear(@("Amount" + n))

Next

Clear(Total Paid, Monitor, Service, Install, AcctNo, Payor, Check#, Use Credit Card, CC Num, CC Exp, CtrlNo)


END SUBROUTINE
  
Back to top
 
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #8 - Sep 27th, 2016 at 12:54pm
Print Post Print Post  
REFRESH_LIST Subroutine

SUBROUTINE REFRESH_LIST()

var vRSID as Int
var vRSID2 as Int //Service 'Service Due'
var vRSID3 as Int //Monitor
var vCount as Int
var vCount2 as Int
var vCount3 as Int
var vCountTotal as Int
var vList as String
var n as Int
var e as Int

var vName as String
var vAcctNo as String
var vInvoice as String
var vDate as String
var vAmount as String
var d as String
var vLastName2 as String
var vTotal as Double


d = " " + @Chr(149) + " "


vRSID = @XResultSetSearch(@FN, "Customers", 1, 2, "!Service Balance=>0", "!CS Balance=>0")
vCount = @XResultSetTotal(vRSID)
XResultSetSort(vRSID, "Company: -1")

For n = 1 to vCount

XResultSetCurrentPosition(vRSID, n)

vName = @XResultSetValue(vRSID, "Company")
vLastName2 = @XResultSetValue(vRSID, "LSTName2")

If vName = "" Then vName = @XResultSetValue(vRSID, "LSTName") + " " + @XResultSetValue(vRSID, "FSTName")

If vLastName2 <> ""  Then vName += " - " + @XResultSetValue(vRSID, "LSTName2") + " " + @XResultSetValue(vRSID, "FSTName2")

vName = @Replace(vName, ",", "")

vAcctNo = @Int(@XResultSetValue(vRSID, "NUM"))

vRSID2 = @XResultSetSubset(vRSID, "Service")
vCount2 = @XResultSetTotal(vRSID2)

     For e = 1 to vCount2
           XResultSetCurrentPosition(vRSID2, e)

           If @TM(@XResultSetValue(vRSID2, "Service Due")) > 0
           {
           vInvoice = @Int(@XResultSetValue(vRSID2, "Invoice #"))

           If @XResultSetValue(vRSID2, "Installation") = "Y" Then
           vInvoice += "-I"
           Else
           vInvoice += "-S"

           vDate = FD(@XResultSetValue(vRSID2, "Date Completed"))
           vAmount = "$" + @Decimals(@XResultSetValue(vRSID2, "Service Due"), 2)
           vTotal += @TM(@XResultSetValue(vRSID2, "Service Due"))
           vCountTotal += 1
           vList = @AppendStringArray(vList, vName + d + vAcctNo + d + vInvoice + d + vDate + d + @AsFormattedByLE(Install, 0, vAmount))
           }
     Next

XResultSetClose(vRSID2)

vRSID3 = @XResultSetSubSet(vRSID, "CS Invoice")
vCount3 = @XResultSetTotal(vRSID3)

     For e = 1 to vCount3
     XResultSetCurrentPosition(vRSID3, e)

     If @TM(@XResultSetValue(vRSID3, "Balance")) > 0
     {
     vInvoice = "Monitor"
     vAmount = "$" + @Decimals(@XResultSetValue(vRSID3, "Balance"), 2)
     vTotal += @TM(@XResultSetValue(vRSID3, "Balance"))
     vCountTotal += 1
     vDate = FD(@XResultSetValue(vRSID3, "Inv Date"))
     vList = @AppendStringArray(vList, vName + d + vAcctNo + d + vInvoice + d + vDate + d + @AsFormattedByLE(Install, 0, vAmount))
     }
     Next

XResultSetClose(vRSID3)

Next

XResultSetClose(vRSID)

vList = @SortStringArray(vList, 0)

PopulateListElement(Open Invoices, vList)
List2 = @Replace(vList, ";", @NL())

TotalBalanceDue = vTotal
TotalLineItems = vCountTotal
TotalCustomers = vCount

ForceRedraw()

// ASA remmed the next 3 lines on 10/05/14 and inserted above ForceRedraw(). Seems to work OK.
// TotalBalanceDue = vTotal
// TotalLineItems = vCountTotal
// TotalCustomers = vCount

END SUBROUTINE
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #9 - Sep 27th, 2016 at 3:27pm
Print Post Print Post  
A lot of that code is very specific to your application and cannot be tested generically to determine where the slowdown may be occurring. Could you please intersperse some debug writeln statements throughout the code, just before and right after every major section, before the start of loops and just after loops, before subroutines are called and right after, so that we can narrow down which routines are affected?

With writelns coming up before and after significant chunks of code, you should be able to narrow this down.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #10 - Sep 29th, 2016 at 6:13pm
Print Post Print Post  
After spending time troubleshooting I determined on our client/server system the SUBROUTINE REFRESH_LIST() took approximately 9-10 seconds using ver. 2.6.2.  Reverting back to ver 2.6 the SubRoutine took approximately 5 seconds. 
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #11 - Sep 29th, 2016 at 6:53pm
Print Post Print Post  
Does this occur if you are running standalone rather than client/server?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #12 - Sep 29th, 2016 at 7:17pm
Print Post Print Post  
No,  takes less approx (1) second (this always ran slower in client/server). As a side note, all clients including the server are running WIN 10 Pro with SSD drives
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #13 - Sep 29th, 2016 at 7:45pm
Print Post Print Post  
I suspect that you suffering from bad network latency. One of the differences between 2.6 and 2.6.2 is that 2.5.2 sends a test message as a prefix to all commands originating on a client. It is tiny, but if your network requires that a computer wait on every message sent, even if it sends the message very quickly -- once it can send it at all, the test message can increase perceived latency. The subroutine you posted above has a lot of very small network commands. Each of these will be preceded by the test message. If the computer is waiting 10 ms to send any message, the wait time is multiplied.

You can turn off the test message by placing:

QUICK NET CHECK TIMEOUT: 0

in the sesame.ini files of your server and client computers. If this speeds things up, you might want to look into any causes on your network for high network latency.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #14 - Sep 30th, 2016 at 1:47pm
Print Post Print Post  
The "QUICK NET CHECK TIMEOUT: 0" command in the ini file appeared to have about a 30-40% improvement.  I am not familiar with the term "high network latency".  No idea where to look (beyond my pay scale). Is there a negative side to leaving the command in the ini file?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Sesame ver 2.6.2
Reply #15 - Sep 30th, 2016 at 3:21pm
Print Post Print Post  
That depends on whether your network is misbehaving in other ways as well. In general, unless you are seeing problems, you can turn it off (set it to zero).

But, you should look into network tuning to reduce latency. The quick network test command is tiny and usually has almost no measurable effect on network speed. There are several causes for high network latency. Think of it like a train that sits in the station too long, waiting for the track to clear, or the cars to fill up. It might be a very fast train once it gets going, but it waits too long to get started.

To reduce the effect of latency (without being a network tuning expert) in Sesame, you might consider using some of the commands that produce more data with fewer commands. For example, in the code above, you are using a lot of XResultSetValue commands, that each return the value of one field. Each of these require a round-trip from the client to the server and back to the client. In many cases, this round trip is only carrying a few bytes of data. Sometimes instead, you might consider using any of the external commands that return data from more than one field at a time, or even more than one record at a time, like XLookupSourceListAll and its ilk.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Andy
Member
*
Offline



Posts: 39
Location: Massachusetts
Joined: Aug 26th, 2014
Re: Sesame ver 2.6.2
Reply #16 - Sep 30th, 2016 at 7:07pm
Print Post Print Post  
Thank you very much for the response
  
Back to top
 
IP Logged