Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to read a text file using C # in the mass data (for example, line 4 data [x, y, z, t], but there are 10 million lines, or more rows of data), then these data according to x, y , z and other data to display the data dynamically to the form, but display the data required to observe the dynamic display.Such as the ability to achieve the dynamic observation of these three-dimensional data. Is there any good methods or efficient algorithms to read and display data. Thank you.
Posted
Comments
Vivek Krishnamurthy 1-Jul-11 13:20pm    
There seems to be a duplicate question, Delete one of them in case.

Greetings;

I see from the question tages you’re using C# 3.0 / C# 3.5. If you’re developing your application for the Microsoft Windows platform using the Microsoft .NET 4.0 Framework, have you considered using the MemoryMappedFile class in the System.IO.MemoryMappedFiles namespace? http://msdn.microsoft.com/en-us/library/system.io.memorymappedfiles.memorymappedfile.aspx

From the MSDN Remarks section in the URL referenced above:

A memory-mapped file maps the contents of a file to an application’s logical address space. Memory-mapped files enable programmers to work with extremely large files because memory can be managed concurrently, and they allow complete, random access to a file without the need for seeking. Memory-mapped files can also be shared across multiple processes.

I hope this was of help and of interest…
 
Share this answer
 
Comments
pucx 2-Jul-11 0:46am    
Is there a method I can use in C# 3.0 / C# 3.5 to solve this problem.
ClockEndGooner 2-Jul-11 22:52pm    
Hi, pucx;

Another contributor to Code Project, Mikael Svenson, posted a C# 3.5 specific article here entitled "Using memory mapped files to conserve physical memory for large arrays" at http://www.codeproject.com/KB/recipes/MemoryMappedGenericArray.aspx

The focus of Mikael's well written articel discusses his intent, design and implementation for a GenericMemoryMappedArray class. And Mikael even made the extra effort to make his class thread safe.

I hope this was of help...
First divide the big file into smaller and process them one by one

Tanvtech
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900