Re: IO function in Vb.Net slower than in Vb6.0
- From: MeltingPoint <none@xxxxxxx>
- Date: Wed, 30 Mar 2005 17:23:41 -0600
"hillcountry74" <shruthibg@xxxxxxxxx> wrote in
news:1112223769.480509.272010@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
> Thanks a lot MP. Really appreciate your help.
>
> Can you please paste the regular expression for this? Can't find it in
> the code.
>
> Also, on the headofhouse, it could be alphanumeric. And yes, some
> fields would be blank.
>
> There could be files of size 400MB. In such a case, reading till
> endoffile might not work. Instead, if it is changed to reading one
line
> at a time, do you think the speed will reduce?
>
> Thanks again.
>
This is the Regular Expression:
Dim _exp As String = "((?<ActionCode>.{1})" & _
"(?<CarrierID>.{25})" & _
"(?<LastName>.{60})" & _
"(?<FirstName>.{30})" & _
"(?<MiddleName>.{15})" & _
"(?<Addr1>.{60})" & _
"(?<Addr2>.{60})" & _
"(?<City>.{30})" & _
"(?<State>.{2})" & _
"(?<Zip>.{10})" & _
"(?<BenefitOption>.{60})" & _
"(?<EmployerGroup>.{15})" & _
"(?<OptionEffDate>.{8})" & _
"(?<HPEffDate>.{8})" & _
"(?<TermDate>.{8})" & _
"(?<Sex>.{1})" & _
"(?<DOB>.{8})" & _
"(?<SSN>.{9})" & _
"(?<Phone>.{12})" & _
"(?<EmployerGroupAnivDate>.{8})" & _
"(?<HeadOfHouse>.{9})" & _
"(?<PrimaryStatus>.{1})" & _
"(?<MaritalStatus>.{1}))"
A pretty good definition can be found on MSDN. Search For RegEx or
Regular Expressions. :)
I'll try to "simulate"(wink wink:) a 400mb file and check performance.
Reading one line at a time is out of the question for this experiment,
as it would require a couple of million reads(guessing), reading in
442bytes * nRecords would be better if not the best way to do it. BUT
this and ReadToEnd both REQUIRE every record to be 442 bytes (or
whatever it is) Off by one byte, and kiss you're records goodbye.
MP
.
- Follow-Ups:
- Re: IO function in Vb.Net slower than in Vb6.0
- From: Stephany Young
- Re: IO function in Vb.Net slower than in Vb6.0
- References:
- Re: IO function in Vb.Net slower than in Vb6.0
- From: hillcountry74
- Re: IO function in Vb.Net slower than in Vb6.0
- From: MeltingPoint
- Re: IO function in Vb.Net slower than in Vb6.0
- From: hillcountry74
- Re: IO function in Vb.Net slower than in Vb6.0
- Prev by Date: RE: How can I get the Menuitem 's name ??
- Next by Date: RE: sqlreader Do...while problem
- Previous by thread: Re: IO function in Vb.Net slower than in Vb6.0
- Next by thread: Re: IO function in Vb.Net slower than in Vb6.0
- Index(es):
Relevant Pages
|