Call Center - Slow Application Launch
Call Center - Slow Application Launch
Slow Application Launch
When I start my application for the first time after booting the computer (W7 and Linux-Wine) or just reboot the machine, the application needs about 1 to 2 minutes to show the first dialog (main application screen).
After then, at each subsequent application start, the first dialog (main application screen) is shown in about 5-6 seconds.
On the main application dialog, there are several folders/tabs (about 12). Each folder/tab contains 10-15 buttons.
I have an impression that working with many folders/tabs is quite slow.
My machine contains i7 processor and a lot of memory so I would say it is not the processor/memory problem.
The same problem on pure W7 machine and on Linux/Wine combination
Anyone have an experience with slow running applications which uses folders/tabs?
Any suggestion appreciated
Thanks
[IMG=http://www.image-share.com/upload/2597/232m.jpg]
xHB 2011E , FWH_10.5
When I start my application for the first time after booting the computer (W7 and Linux-Wine) or just reboot the machine, the application needs about 1 to 2 minutes to show the first dialog (main application screen).
After then, at each subsequent application start, the first dialog (main application screen) is shown in about 5-6 seconds.
On the main application dialog, there are several folders/tabs (about 12). Each folder/tab contains 10-15 buttons.
I have an impression that working with many folders/tabs is quite slow.
My machine contains i7 processor and a lot of memory so I would say it is not the processor/memory problem.
The same problem on pure W7 machine and on Linux/Wine combination
Anyone have an experience with slow running applications which uses folders/tabs?
Any suggestion appreciated
Thanks
[IMG=http://www.image-share.com/upload/2597/232m.jpg]
xHB 2011E , FWH_10.5
- Antonio Linares
- Site Admin
- Posts: 42425
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 15 times
- Been thanked: 48 times
- Contact:
Re: Call Center - Slow Application Launch
Dubrabko,
Maybe your app manages too much controls, but that should not affect that much.
You are using old xHB and FWH versions. I would suggest to upgrade and use the most recent code, and please consider to migrate to Harbour as that could make an important difference.
Harbour has greatly improved along these years. All of you should realize that using an old version of xHarbour/Harbour does not help you at all. A lot of work has been done on Harbour (and on FWH) and the current version (3.2) works really fine.
I can't say for sure that is the reason of the slowness that you comment, but for sure, you should notice a difference if you use the most recent Harbour and FWH.
Maybe your app manages too much controls, but that should not affect that much.
You are using old xHB and FWH versions. I would suggest to upgrade and use the most recent code, and please consider to migrate to Harbour as that could make an important difference.
Harbour has greatly improved along these years. All of you should realize that using an old version of xHarbour/Harbour does not help you at all. A lot of work has been done on Harbour (and on FWH) and the current version (3.2) works really fine.
I can't say for sure that is the reason of the slowness that you comment, but for sure, you should notice a difference if you use the most recent Harbour and FWH.
- Antonio Linares
- Site Admin
- Posts: 42425
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 15 times
- Been thanked: 48 times
- Contact:
Re: Call Center - Slow Application Launch
Slowness is directly related to the memory management, and Harbour has improved so much on that area.
Maybe there are other factors too that we may review. But lets first discard that the problem does not come from using those old versions. Thanks
Maybe there are other factors too that we may review. But lets first discard that the problem does not come from using those old versions. Thanks
- Rick Lipkin
- Posts: 2668
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Re: Call Center - Slow Application Launch
Metro
Looks like a nice app .. what back end database are you using .dbf or Ado?
Rick Lipkin
Looks like a nice app .. what back end database are you using .dbf or Ado?
Rick Lipkin
Re: Call Center - Slow Application Launch
Antonio, Rick
Thanks for the quick reply.
Application when starting, really works well and quickly
Yeah, I'm thinking about crossing the Harbour, but I'm not sure I have a good solution for working with MySQL database!
The first version, works with a PgSQL - (Xbase language) which proved to be slow and unstable. (50 USER, 2 million records). The problem was to work with indexes. So I switched to natural SQL without Xbase language.
The second version works with MySQL database and xHarbour use for connection to the database and everything else is the SQL syntax (nErr = osql: exec (cSql, ...))
Thanks for the quick reply.
Application when starting, really works well and quickly
Yeah, I'm thinking about crossing the Harbour, but I'm not sure I have a good solution for working with MySQL database!
The first version, works with a PgSQL - (Xbase language) which proved to be slow and unstable. (50 USER, 2 million records). The problem was to work with indexes. So I switched to natural SQL without Xbase language.
The second version works with MySQL database and xHarbour use for connection to the database and everything else is the SQL syntax (nErr = osql: exec (cSql, ...))
- nageswaragunupudi
- Posts: 10711
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Call Center - Slow Application Launch
Sharing my experiences:
This has nothing to do with FWH, xHb/xHarbour/Harbour. Whatever we use the result will not be much different.
Initially sometime is taken to establish connection with the remote server, opening some tables and reading some data necessary to start the initial main window. It is here the delay occurs and we need to optimize this part. This time mostly depends on the connection speeds, the amount of data we read. We should be *extremely* cautious when dealing with huge tables. When opening very large tables, never to open without where clause so that only a small subset is read.
We need to measure the time it takes from "function Main()" till "ACTIVATE WINDOW/DIALOG". This is the time we need to optimize and this has nothing to do with fwh or (x)Harbour. This may depend on what library we are using to communicate with the Sql server and what are we doing initially (what tables we are opening and reading).
Even after the best optimization, this process does take a few seconds, and even that delay is not acceptable for good user experience. In such cases we can adopt one the following strategies suitable to our application.
1. Display a progress message while doing the initial setup. Or display a logo and in the background do the initial setup.
2. Display the main window without data and display progress messase while doing the initial setup.
This has nothing to do with FWH, xHb/xHarbour/Harbour. Whatever we use the result will not be much different.
Initially sometime is taken to establish connection with the remote server, opening some tables and reading some data necessary to start the initial main window. It is here the delay occurs and we need to optimize this part. This time mostly depends on the connection speeds, the amount of data we read. We should be *extremely* cautious when dealing with huge tables. When opening very large tables, never to open without where clause so that only a small subset is read.
We need to measure the time it takes from "function Main()" till "ACTIVATE WINDOW/DIALOG". This is the time we need to optimize and this has nothing to do with fwh or (x)Harbour. This may depend on what library we are using to communicate with the Sql server and what are we doing initially (what tables we are opening and reading).
Even after the best optimization, this process does take a few seconds, and even that delay is not acceptable for good user experience. In such cases we can adopt one the following strategies suitable to our application.
1. Display a progress message while doing the initial setup. Or display a logo and in the background do the initial setup.
2. Display the main window without data and display progress messase while doing the initial setup.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 42425
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 15 times
- Been thanked: 48 times
- Contact:
Re: Call Center - Slow Application Launch
Yes, I agree with Rao. What he explains makes perfect sense and I missed to consider it
Re: Call Center - Slow Application Launch
Rao,
Thank you for your experience
I will describe the flow of the program:
The delay is always at forming Folder!
In the first version (PgSQL) I used (xHarbour) and accessing the tables on Xbase way. As dbf-bases (So-open, seek, append, reclock, ....) And then that happened, just what you are suggesting. Very slow and unstable.
In the second version (MySQL) using xHarbour exclusively for connection to the server (localhost, network, remout-SSH). manipulation of data across functions nErr = osql: exec (cSql, ...), where cSql pure SQL syntax. I work exclusively with the array. It works very fast and stable.
I think it is well settled with the notification:
SET MESSAGE OF oWndCRM TO cMesage
Best regards
Thank you for your experience
I will describe the flow of the program:
Code: Select all | Expand
/ / ----------------------------
Function Main ()
InitSys ()
DefTableName ()
if TestConecction ()
if SysLogin ()
MainApp ()
endif
else
/ / Msg
endif
Return
/ / ----------------------------
MainApp function ()
DEFINE WINDOW oWndCRM
SET MESSAGE OF oWndCRM TO cMesage //x ---------------> With this message I am presenting the message of progress
ACTIVATE WINDOW ON oWndCRM DefDlg INIT ()
Return
/ / ----------------------------
DefDlg function ()
DEFINE DIALOG oDlg RESOURCE "PHONENEW_WIDE"
REDEFINE FOLDER oFld ID xxx OF oDlg
// x ------------------------------> Here's delay
Def_Fold1 ()
// x ------------------------------> or here
Def_Fold1 ()
//x ------------------------------> or here
//...
Def_Fold16 ()
ACTIVATE DIALOG oDlg
Return
/ / ----------------------------
The delay is always at forming Folder!
In the first version (PgSQL) I used (xHarbour) and accessing the tables on Xbase way. As dbf-bases (So-open, seek, append, reclock, ....) And then that happened, just what you are suggesting. Very slow and unstable.
In the second version (MySQL) using xHarbour exclusively for connection to the server (localhost, network, remout-SSH). manipulation of data across functions nErr = osql: exec (cSql, ...), where cSql pure SQL syntax. I work exclusively with the array. It works very fast and stable.
I think it is well settled with the notification:
SET MESSAGE OF oWndCRM TO cMesage
Best regards
Re: Call Center - Slow Application Launch
Initial setap is completely finished, and the connection to the database until it comes to SysLogin() functions .
[IMG=http://www.image-share.com/upload/2598/179m.jpg]
2-Display the main window without data and display progress messase while doing the initial setup.
The main window is formed without data. I just checked the log-in username / password.
[IMG=http://www.image-share.com/upload/2598/179m.jpg]
2-Display the main window without data and display progress messase while doing the initial setup.
The main window is formed without data. I just checked the log-in username / password.
- Antonio Linares
- Site Admin
- Posts: 42425
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 15 times
- Been thanked: 48 times
- Contact:
Re: Call Center - Slow Application Launch
Dubrabko,
A possible solution is not to redefine all the controls in all the folder pages at the same time:
1. Just build the first page (the one that it is visible).
2. When a different folder tab is clicked, then you could check if it has been defined such folder tab (use a static variable or so to control it, or check if oFld:aDialogs[ x ] length is zero) and then redefine it.
This way you don't build everything at once.
I have not tested it myself, but it should work. Please try it and if you get troubles, then I will explain you an alternative way to redefine the controls in each tab (the idea would be to use Class TFolder METHOD LoadPages( aResNames, bRedefineControls ))
A possible solution is not to redefine all the controls in all the folder pages at the same time:
1. Just build the first page (the one that it is visible).
2. When a different folder tab is clicked, then you could check if it has been defined such folder tab (use a static variable or so to control it, or check if oFld:aDialogs[ x ] length is zero) and then redefine it.
This way you don't build everything at once.
I have not tested it myself, but it should work. Please try it and if you get troubles, then I will explain you an alternative way to redefine the controls in each tab (the idea would be to use Class TFolder METHOD LoadPages( aResNames, bRedefineControls ))
Re: Call Center - Slow Application Launch
Antonio,
I created only one folder, but the problem is about the same.
After reset the computer, the first time delay 4 min and every next start almost immediately.
[IMG=http://www.image-share.com/upload/2600/42m.jpg]
Best regards
Dubravko Basic
I created only one folder, but the problem is about the same.
After reset the computer, the first time delay 4 min and every next start almost immediately.
[IMG=http://www.image-share.com/upload/2600/42m.jpg]
Best regards
Dubravko Basic
- nageswaragunupudi
- Posts: 10711
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Call Center - Slow Application Launch
metro wrote:Antonio,
I created only one folder, but the problem is about the same.
After reset the computer, the first time delay 4 min and every next start almost immediately.
[IMG=http://www.image-share.com/upload/2600/42m.jpg]
Best regards
Dubravko Basic
You are showing some data in the browse box on left.
How are you reading the data? From what table? What is your Sql?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Call Center - Slow Application Launch
Rao,
The system works with a MySQL database.
There are several modes of operation.
1 - Free Mode
The agent logs on to the system and gain FrontEnd
[IMG=http://www.image-share.com/upload/2600/81m.jpg]
From the admin gets the task (Combobox - contry, Conty, Town addres ... etc). Once selected, press the button Refresh. The program is only now reads data from a table and displays the brows.
2 - Job Mode
Agent when logging select job that will work.
[IMG=http://www.image-share.com/upload/2600/80m.jpg]
Applications, before forming folder prepare array data (arraj variable is public). By measuring I found that it takes a very short time.
After logging gain FrontEnd:
[IMG=http://www.image-share.com/upload/2600/42m.jpg]
The problem exists in both modes of operation.
This is the SQL query - Mode 1
cComm: = "SELECT salutation, first_name, last_name, title,
account_name,email1,primary_address_street,primary_address_city,primary_address_postalcode,id,phone_home,phone_mobile,phone_work,phone_other "+;
"FROM" + cLeads + "" +;
"WHERE" cWhereQ + + "" +;
"ASC"
Best regards
Dubravko Basic
The system works with a MySQL database.
There are several modes of operation.
1 - Free Mode
The agent logs on to the system and gain FrontEnd
[IMG=http://www.image-share.com/upload/2600/81m.jpg]
From the admin gets the task (Combobox - contry, Conty, Town addres ... etc). Once selected, press the button Refresh. The program is only now reads data from a table and displays the brows.
2 - Job Mode
Agent when logging select job that will work.
[IMG=http://www.image-share.com/upload/2600/80m.jpg]
Applications, before forming folder prepare array data (arraj variable is public). By measuring I found that it takes a very short time.
After logging gain FrontEnd:
[IMG=http://www.image-share.com/upload/2600/42m.jpg]
The problem exists in both modes of operation.
This is the SQL query - Mode 1
cComm: = "SELECT salutation, first_name, last_name, title,
account_name,email1,primary_address_street,primary_address_city,primary_address_postalcode,id,phone_home,phone_mobile,phone_work,phone_other "+;
"FROM" + cLeads + "" +;
"WHERE" cWhereQ + + "" +;
"ASC"
Best regards
Dubravko Basic
- nageswaragunupudi
- Posts: 10711
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Call Center - Slow Application Launch
I see that all the time taken is for reading data from the tables.
You need to optimize this area.
Keep aside all windows and dialogs and folders.
Just write small code to read the data and optimize on the speeds. After that you incorporate the windows/folders, etc.
One hint: There will never be any major delays with fwh/(x)Harbour. Any major delay is only due to time taken to read data.
I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses.
For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT.
By the way we do not know what are you using to connect to MySql server. Are you using ADO or TMySql or TDolphin?
You need to optimize this area.
Keep aside all windows and dialogs and folders.
Just write small code to read the data and optimize on the speeds. After that you incorporate the windows/folders, etc.
One hint: There will never be any major delays with fwh/(x)Harbour. Any major delay is only due to time taken to read data.
I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses.
For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT.
By the way we do not know what are you using to connect to MySql server. Are you using ADO or TMySql or TDolphin?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Call Center - Slow Application Launch
Rao,
Thanks for your reply
1) I see that all the time is taken for reading data from the tables.
You need to optimize this area.
The data is read into an array and what you see in the picture is the brows array. Not all the time.
2) Keep aside all windows and dialogs and folders.
Just write small code to read the data and optimize on the speeds. After that you incorporate the windows / folders, etc..
Exactly read data
3) One hint: There will never be any major delays with FWH / (x) Harbour. Any major delay is only due to time taken to read the data.
No. MySQL has a very good set Index. Speed data retrieval is measured and it is very good.
4) I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses.
For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT.
Yes. The database is very large. I have optimized the MySQL server to work with large data.
5) By the way we do not know what are you using to connect to MySQL server. Are you using ADO or TMySql or TDolphin?
I use xHarbour SQL RDD. Connection of the base can be seen:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25346&p=139607&hilit=ssh%20#p138353
I mentioned, I'm on line at the base constantly, but the data read (or insert, update)
when we need to. Browse array only, not the database (table).
The problem is that after a reset or when the computer is turned on, the formation of the app is about 4 minutes, and all other activation apps are fast!
Does the problem would be to cache or something?
Best regards
D. Basic
Thanks for your reply
1) I see that all the time is taken for reading data from the tables.
You need to optimize this area.
The data is read into an array and what you see in the picture is the brows array. Not all the time.
2) Keep aside all windows and dialogs and folders.
Just write small code to read the data and optimize on the speeds. After that you incorporate the windows / folders, etc..
Exactly read data
3) One hint: There will never be any major delays with FWH / (x) Harbour. Any major delay is only due to time taken to read the data.
No. MySQL has a very good set Index. Speed data retrieval is measured and it is very good.
4) I guess you are dealing with very large files. You need to work on optimizing your queries. In particular it is a technique to optimize where clauses if we are dealing with large tables. Much depends on creating right indexes and usages of the indexed fields in our where clauses.
For example, if the where clause is "WHERE DEPT = 10", the query is damn slow if there is no index on DEPT.
Yes. The database is very large. I have optimized the MySQL server to work with large data.
5) By the way we do not know what are you using to connect to MySQL server. Are you using ADO or TMySql or TDolphin?
I use xHarbour SQL RDD. Connection of the base can be seen:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25346&p=139607&hilit=ssh%20#p138353
I mentioned, I'm on line at the base constantly, but the data read (or insert, update)
when we need to. Browse array only, not the database (table).
The problem is that after a reset or when the computer is turned on, the formation of the app is about 4 minutes, and all other activation apps are fast!
Does the problem would be to cache or something?
Best regards
D. Basic