sorting lines of an enormous file.txt in java

后端 未结 6 1039
小蘑菇
小蘑菇 2020-12-10 16:08

I\'m working with a very big text file (755Mb). I need to sort the lines (about 1890000) and then write them back in another file.

I already noticed that discussion

6条回答
  •  眼角桃花
    2020-12-10 16:46

    Why don't you try multithreading and increasing heap size of the program you are running? (this also requires you to use merge sort kind of thing provided you have more memory than 755mb in your system.)

提交回复
热议问题