Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vfp speed slow if the system locale is set to other than english language. 4

Status
Not open for further replies.

naeempk

MIS
Aug 6, 2005
17
BH
Hello,

I and my other developers have set their system language to Arabic through system locale option via windows regional languages. We are using windows 7 and 8.1. Both vfp 7 and 9 have the same speed problem. If we change the system locale to default English, then program as well vfp exe run 5X faster. The program is scanning a table having more than 150000 records. On machines with English language it takes around 14 mins while with Arabic language it takes more than 1 hour and 30 mins.

Is there any vfp/system setting to correct this?

Thanks
 
I don't know, if someone can help about that, I'd look into collation, though. SQL speed is best at collation sequence MACHINE. If you have arabic data, you'll SET COLLATE TO 'Arabic', I guess and define tables and fields with that collation. That should have no impact, whether the regional setting is arabic or english, though. You might still investigate in that direction.

You should do coverage logging, to see what goes slower in arabic. See coverage profiler.

Bye, Olaf.
 
One more point. Whatever collation sequence you use, make sure that the current collation sequence matches the one for the table you're working with, that is, that CPCurrent() = CPDBF(). Failing to do so can slow things down considerably, at least in VFP 9.

Tamar
 
Thank you Tamar. My code page from Cpcurrent() is 1256 (Arabic) and CPDBF() is 1252 (English). This application is using English as input language but later due to some requirement I set Arabic system locale to print few reports in Arabic.

What can I do to improve the speed or is there some better/alternate way ?

Thanks
 
If you only need arabic for certain reports, then only set the codepage to arabic during reporting. Any indexes done with machine or english collation will not be used for query rushmore optimization.
Setting codepage to 1252 speed should be normal again.

Bye, Olaf.
 
How can I switch to Arabic code page when printing Arabic reports? Since it only works by setting the system locale from regional settings of control panel which needs to restart the PC.
 
The OS should support multiple languages, that's possible with language packs at least with Vista.
What I thought is, you could switch codepage VFP uses at runtime via SET CODEPAGE, so you could switch between 1252 and 1256.

The only conversion function is STRCONV converting between codepages, and a form can differ from the general code page by setting FontCharset (178 for Arabic Script).
Refer to and search for "FontCharSet" on that page, you'll see MS intends this for internationl reports needing other font scripts like Arabic, while the main codepage still is english.

Bye, Olaf.
 
Yes, I said "What I thought is, you could". That SET command doesn't exist. I wonder why.
So the only solution is to work with english code page in general and english or machine collation and use fontcherset for the few arabic reports.

On the other side if you have more arabic parts, use arabic codepage and collation and recreate all indexes with arabic collation.

Bye, Olaf.
 
dear friends,

Can you help me how to use urdu in Visual Foxpro 9.0 and using windows 7. I search lot on internet but not success. I enabled urdu keyboard and working fine in all application except foxpro. please guide me how to use urdu in forms, reports and dbf.

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top