Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to fastly write a huge array to file ?

Michael_LotfyMichael_Lotfy Member Posts: 1
I use a huge list to save complex data and I save this list to file. the problem is that when an element of this list changes I need to save the entire list to the file. and this consumes alot of time because of I use loop to write element by element to the file.
If any one know a good solution, please reply to me urgent.
Note: the size of each element is dynamic according to the changes the user made every time.

Thank alot.

Comments

  • stoberstober Member Posts: 9,765 ✭✭✭
    : I use a huge list to save complex data and I save this list to file. the problem is that when an element of this list changes I need to save the entire list to the file. and this consumes alot of time because of I use loop to write element by element to the file.
    : If any one know a good solution, please reply to me urgent.
    : Note: the size of each element is dynamic according to the changes the user made every time.
    :
    : Thank alot.
    :

    Is it a binary file? If not, then make it binary. If the data are all numeric, then, using random access methods, you can just update the numers that actually changed instead of rewriting the entire file.
Sign In or Register to comment.