« Life Has Just Gotten Easier | Main | I'm Just A Party Animal »

July 07, 2010

My VFP Beliefs Have Been Re-enforced (Again!)

I hope that you are really bored because this blog is going to RAMBLE. I know this because while nothing I am about to say is earth shattering, it is good to know that several of my beliefs have, once again, been validated. I am hoping that you will take the time to read this blog and take from it, ideas I have stated before (but can’t be repeated enough), adopt them as your own, and, eventually, get your own validation of them.

Last week, I was having a Visual FoxPro issue where a report that I inherited was running slowly. In this case, “slowly” means in the five minute range for a three page report. Speaking with the primary user, it seems that this report has been running slowly for MANY years, but since she runs it once a month, she felt that she could take the slowness into account and it would give her time to wash and wax her car. Don’t you just love it when a user says “Oh, it has always been doing that. I have just learned to live with it.”?

The really unusual thing (at least, to me) about it was that it only took under 5 seconds to run on my computer. After our network techie confirmed that all of the workstations (including mine) were configured exactly the same and that the network connections and speeds were the same, it seemed that there might be a software issue. The obvious choice was to check the code. Obvious to a “normal” developer, but to me, I INSTINCTIVELY realized that it couldn’t be a coding issue. After all, we were running the same executable on identical computers, over the same network, hitting the same data, using the same indexes, and yet… when I ran the report, it was 60 times faster. Additionally, it was not a printer issue since this particular report had to be previewed before being printed.

After performing several benchmark tests on other workstations, a pattern began to develop. Of the 25 workstations, three of them (mine and two other “development” computers) were the ONLY CPUs to run the report quickly. The other 22 all took five minutes on average. The ONLY difference between the computers was that the three “development” computers had full-blown VFP9 installed while the workstations had only the run-time files. Could it be that the code ran faster using VFP9.exe rather than the run-time files? That appeared to be the case. At this point I will stop with the details and just say that I convinced myself that this WAS the case. When I renamed the VFP9.exe (on MY computer) and ran the reporting exe , it also took five minutes. Strange. Very strange. This just couldn’t be right, and yet, it sure seemed that way.

Since the solution is not actually the reason for this blog, I will end the suspense by saying that the issue has been resolved by modifying and optimizing the SQL SELECT statement that created the reporting cursor. That is how I actually corrected the situation, but I am still concerned WHY the old code ran faster when run on a CPU with full-blown VFP9 installed. That, too, is a story for another time (after some further study). OK, so my problem is solved. At least, corrected so that the report runs quickly. After all, in many cases, that is the goal. Just fix it. Make it work right. Done!

However, on this journey to correct the situation, I took it upon myself to send out a short email to members of the FoxPro community for THEIR suggested solutions. Now, of course, there isn’t any formal “email directory” of FoxPro users available, but I have my personal list of VFPers whom I have met over the years. How I compiled this list is very important. I compiled it, mainly, while “networking” at various FoxPro conferences. Over the years, I have followed the advice of other VFPers and while at conferences, I took it upon myself to approach the “gurus” who were there and introduce myself. This has paid untold dividends over the years. Besides becoming friends (on various levels), it also gave me the opportunity to widen my range of people who are (always cheerful and willing and) eager to help. Unfortunately, the number of Visual FoxPro conferences is dwindling. Fortunately, there is the Southwest FoxPro Conference (www.swfox.net) which is the best Visual FoxPro conference in the United States, bar none. And guess what? The next conference is just around the corner. It is scheduled to take place in Mesa, AZ in mid-October. Follow the link for all the details. I cannot recommend it highly enough if you are still using VFP. Even if you are a VFP developer thinking about “jumping ship” and moving on, there are many sessions that will aid you in doing just that. You owe it to yourself to check it out.

The response to my blanket email blast was outstanding. I received at least 15 responses with suggestions on what to try to fix my dilemma. ALL, repeat, ALL of them were worth considering. Not only did I receive 15 replies, but they all arrived within 24 hours. This, again, just confirmed what I have come to know and believe… namely, the Visual FoxPro community is the most charitable with both their time and knowledge. The synergistic, collective knowledge it has from “book learnin’” as well as practical experience is a knowledge base that should not be underestimated. The VFP community is BETTER than hitting F1. Those are my opinions and I am sticking to them. Thank you everyone for lending a hand.

Posted by Dave Aring on July 7, 2010 | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341fba8753ef01348543ca3a970c

Listed below are links to weblogs that reference My VFP Beliefs Have Been Re-enforced (Again!):

Comments

So true.

But I'm curious to read how solving the preformance issue turns out...

You say it's an inherited application.

My bet: an environment setting that isn't being explicitly set in the runtime environment.

SYS(3050)? SYS(2450) (new in vfp 8)? SYS(3092) (new in 9)? Something like that.

Posted by: Steven Black | Jul 13, 2010 11:13:22 PM

Good Blog,Any one can post new software articles or project in http://www.buzzycode.com/

Posted by: shahid | Jul 20, 2010 7:06:44 AM

We provide Internet Marketing/SEO, Web Design and Software Services at most affordable prices. Place a free inquiry at [email protected] and we will call you back instantly. http://www.theprofitron.com/

Posted by: Albert | Jan 27, 2011 11:07:46 AM

Great post! Thanks for sharing! Have found the information very useful. Thanks

Posted by: SEO Birmingham | May 13, 2011 10:42:50 AM

Thanks for sharing this information.....

Food Jockeyis an iPhone App to let you discover food, eating places around you and as per your interest.....

http://itunes.apple.com/in/app/food-jockey/id437176045?mt=8#

Posted by: Mustaq | Jul 25, 2011 5:54:48 AM

The net does provide an opportunity for saviours to abound. I was having a problem with a virus and got a fair bit of advice on how to mend it. Without that, my computer was doomed.

Posted by: Itaz Document | Dec 8, 2011 12:11:32 AM

thank for information

http://software-document.blogspot.com/

Posted by: texsum | Jan 31, 2012 9:30:57 AM

The comments to this entry are closed.