FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Call Center - Slow Application Launch
Posts: 18
Joined: Tue Sep 25, 2012 06:01 PM
Re: Call Center - Slow Application Launch
Posted: Tue Jul 29, 2014 08:48 PM
Antonio, Rao

After a more detailed analysis, I found the problem.
Actually, there are two things that affect the above problem.

After the formation of the folder, perform all the functions listed in COMOBOX ... ON CHANGE funx()
Function funx() is actually a SQL query.
I assume that this function is executed only when changing the ComboBox, not when defining folder. The solution is the variable that changed after the first start.

Another thing is the SQL query. When executed for the first time, takes on a large base for a long time. Another time, when he executed the same query is already cached and executed significantly shorter.
By optimizing queries and good indexing applications work very well with large databases.


Summary, Mr. Rao, you're absolutely right.

Dubravko Basic
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Call Center - Slow Application Launch
Posted: Tue Jul 29, 2014 10:12 PM

I didn't see this before, but from your original description, my first thought would be that the app is slow the first time because you have just started the computer. Is it still running background processes ? Leave it on all the time and see what happens when you enter the program for the first time the next day.

Windows has a lot of background work today when first started. This includes updating, backups, and far more. I find it takes a lot of time from the CPU. Even though it has an i7, my understanding is that most work will still be done by one processor unless the tasks are specifically written to take advantage of the others ( info drawn from some Microsoft posts ).

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 18
Joined: Tue Sep 25, 2012 06:01 PM
Re: Call Center - Slow Application Launch
Posted: Wed Jul 30, 2014 01:40 AM
Tim

I tried to explain the whole problem (now that I know what is causing the slowness of the app) starting from the MySQL database. When you turn on the computer I start the MySQL database (localhost). Cash in the database is empty. If I send a SQL query on a large table, the first time you are running, the response I get for example 50 sec. When I send the same query again, the response I get for example, 1.2 sec. The reason is cached internally in the MySQL database.

When I start the program, in the folder there are several ComboBox and ... ON CHANGE FunX ();
Function FunX() real SQL query that acts as above. So, in that sense, and application had delay!

I presumed, to be executed FunX() when defining the ComboBox

I solved the problem so it does not authorize the execution of the function while the application is not fully formed, and of course, optimizing SQL queries and good indexing.

Of course, Windows is doing everything in the background, but that's not the problem here.

Dubravko Basic

Continue the discussion