Foxpert Software Development & Consulting

Menu

Whitepapers
Downloads
Knowlbits
Guineu

2007-10Oct-06

Accumulating the slow parts

As a developer you need a fast machine and fast access to keep the duration of the typical edit-compile-run cycle at a minumum. Slow machines have direct impact on development times. Having a fast machine has a major drawback though: You don't get a feeling what your application feels like to a real user that doesn't work with local data on a fast machine.

Monitoring tools like FILEMON or Ethereal give you a first overview of the amount of data that your application transfers across the network in a particular situation. After optimizing the application to reduce bandwidth usage you might still be surprised.

Many statements in Visual FoxPro, especially SQL SELECT statements, cache heavily. Cached contents expires after a timeout period of five seconds, by default. You can control the time with SET REFRESH and the "Refresh" setting of CURSORSETPROP.

You might get nasty surprises if your code consists of a series of SELECT statements that access the same table. On your machine all these statements execute in less than five seconds. Consequently, only the first SELECT statement actually reads from the table. All subsequent SELECT statements access the cache. On real client machines, though, SELECT statements easily run for more than five seconds. VFP invalidates the cache right after terminating the first query. The next queries force VFP to read the entire table over and over again.

Instead of transferring like 60 MB in a two seconds for ten queries on your local machine, you might end up transferring 600 MB in a over a minute across the network... just because every single query runs for more than five seconds.

Previous KnowlBits

RSS

October 2009 (2)

September 2009 (1)

August 2009 (4)

July 2009 (2)

June 2009 (2)

May 2009 (1)

April 2009 (1)

March 2009 (1)

August 2008 (1)

July 2008 (2)

May 2008 (1)

April 2008 (2)

January 2008 (2)

December 2007 (2)

November 2007 (2)

October 2007 (1)

September 2007 (1)

August 2007 (5)

July 2007 (4)

May 2007 (6)

March 2007 (3)

February 2007 (7)

January 2007 (6)

November 2006 (1)

October 2006 (3)

September 2006 (10)

June 2006 (2)

May 2006 (6)

April 2006 (1)


Impressum Kontakt Contact