Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dotnetpro database performance contest
Message
 
À
11/05/2007 23:19:20
Markus Winhard
Lauton Software GmbH
Nürnberg, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
VFP Compiler for .NET
Divers
Thread ID:
01224231
Message ID:
01224960
Vues:
13
Hi Markus:

The Compiler and runtime now has its own (debuting version) TableLayer64 layer, this one does not requires the VFP9 runtime at all. Of course if this alpha TableLayer64 turns to be not as speedy like VFP before the contest, we'll switch to the VFP9TableLayer.

While your code looks good, I'm afraid we can't match VFP's import delimited performance as it is written in C/C++. Maybe a more low level approach could be better like using directly a .NET stream an iterating over the bytes not strings.



>Hi Samuel,
>
>>I mean the Compiler running on top of the Data Layer for 64 bits (not VFP Runtime at all), already supports those commands.
>>Of course if we don't surpass VFP speed, we can always use the VFP9TableLayer functionality, compiling your code.
>
>not sure if I got you right. Do you say that the new VFPCompiler release would compile and run my code if I used the vfp9t.dll data layer?
>
>
>>To translate the PDF you could use http://open-source.onestop.net/2005/07/pdftohtml.html or grab the commandline version in sourceforge.net and turn that to HTML.
>
>I found an easier solution: http://www.freeware995.com/bin/pdfedit.exe
>
>
>>Then use Google translator.
>
>Did it. You can view the results at http://indot.net/dotnetprocontest07/dotnetprocontest_english.html
>
>
>>We'll implement APPEND FROM, anyone knowing .NET tricks for speedy parsing is welcome to provide a .NET implementation written of course in VFP.
>
>Sorry, my knowledge of .NET is not that deep. As a starting point I'd try something like this
>
>		static void AppendFromDelimited(string tcFilename, string tcDelimiter, int tnCodepage)
>		{
>			double lnSec0 = System.DateTime.Now.Subtract(System.DateTime.Today).Duration().TotalMilliseconds / 1000;
>
>			char[] lcDelimiter = tcDelimiter.ToCharArray();
>
>			string[] laLine;
>			int i;
>
>			StreamReader loSR = new StreamReader(tcFilename, Encoding.GetEncoding(tnCodepage));
>			while (loSR.Peek() > -1)
>			{
>				laLine = loSR.ReadLine().Split(lcDelimiter);
>				for (i = 0; i < laLine.Length; i++)
>				{
>					// Here each field should be written to the database.
>					//Console.WriteLine(laLine[i]);
>				}
>				//Console.WriteLine();
>			}
>			loSR.Close();
>
>			double lnSec1 = System.DateTime.Now.Subtract(System.DateTime.Today).Duration().TotalMilliseconds / 1000;
>
>			Console.WriteLine("Done in " + (lnSec1 - lnSec0) + " seconds");
>			Console.Read();
>		}
>
>
>Unfortunately this sample code takes already 1.5 seconds. Vfp9's APPEND FROM...DELIMITED is done in 2 seconds.
>
>Markus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform