Re: Regarding Opening a 1GB File for Processing.
From: Ashish M Bhonkiya (bhonkiya_at_hotmail.com.nospam)
Date: 06/23/04
- Next message: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Previous message: Bob G: "Application Center Test setting concurrent Users"
- In reply to: Lasse Vågsæther Karlsen: "Re: Regarding Opening a 1GB File for Processing."
- Next in thread: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Reply: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Reply: Thomas Ganss: "Re: Regarding Opening a 1GB File for Processing."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 11:57:35 -0700
Thanks for your reply.
its a text file each record is of 100 chars, and the
following is the structure of the file. i need to sort the
file based in the first field, second field is the record
number, ids are not unique, record number (2nd filed) is
unique.
0000000601 0000000001 Cherry Venus
sdjsdiuhndxjsnddxs
0000000054 0000000002 Orange Jupiter
xuhdexeudfhxe
as per ur suggestion i have also tried extracting the
first two fields and sort the list, but after the
producing the sorted list, when i start searching the
original list its taking much time as i have to read the
file again.
some more clues appreciated.
Thanks
Ashish M Bhonkiya
>-----Original Message-----
>"Ashish M Bhonkiya" <bhonkiya@hotmail.com.nospam> wrote in
>news:OEM9XvRWEHA.3664@TK2MSFTNGP12.phx.gbl:
>
>> Hi Group,
>>
>> I have a huge one GB file to do some processing
(sorting) using .Net
>> Framework (C-Sharp language). What is the best efficent
way to do
>> this.
><snip>
>
>I would say the approach differs depending on the file
and its contents.
>
>For instance, if the file contains records of some kind
that contain a
>value you want to sort on, and the size of this value is
small compared to
>the size of the full record, then perhaps construct a new
list containing
>that value + the position in the original file that the
full record can be
>found, then sort this list. Afterwards simply loop
through the list and
>grabbing the right record and outputting to a new file in
the correct
>order.
>
>Other than that I would do as you suggest, split up the
file and use
>quicksort on it.
>
>However, I would still try to minimize the amount of
writing you would need
>to do during the sorting.
>
>Is the file a text file or a structured file or ... ?
>
>--
>Lasse Vågsæther Karlsen
>lasse@vkarlsen.no
>PGP KeyID: 0x0270466B
>.
>
- Next message: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Previous message: Bob G: "Application Center Test setting concurrent Users"
- In reply to: Lasse Vågsæther Karlsen: "Re: Regarding Opening a 1GB File for Processing."
- Next in thread: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Reply: Michael Pearson: "Re: Regarding Opening a 1GB File for Processing."
- Reply: Thomas Ganss: "Re: Regarding Opening a 1GB File for Processing."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|