KeCa 4 I think title says it all. I'm currently using a StreamWriter and adding each line to a Hashset, but combos of 1MILL and above, take around 40 seconds to load. Is there a faster way? Quote Share this post Link to post Share on other sites
0x29A 45 Backgroundworker or load data asynchronous to wherever you want Quote Share this post Link to post Share on other sites
Dijkstra 1 There's not need to actually load all the combos in memory at once. Just keep the stream open and read a combo when you need one. Loading 1 million combos will take up a chunk of memory. Quote Share this post Link to post Share on other sites
Ethan 146 Just load it up in chunks or when you're actually using a chunk. Quote Share this post Link to post Share on other sites
Edward 47 I would use File.ReadAllLines() , i think its the best. Quote Share this post Link to post Share on other sites
0x29A 45 I would use File.ReadAllLines() , i think its the best. This will cause your application to freezing and continue working when the list is done (if its alot text it may also crash and stop completely working), its the same like StreamReader. With less text its okay but with such big text like 1 million of lines and this stuff you won't come far with File or StreamReader Class except using it in a backgroundworker. Quote Share this post Link to post Share on other sites
Deos 162 Well, depends, if you are using File.ReadAllLines() in a WinForms/WPF application, it will indeed freeze the application till its fully loaded, unless its ran on another thread. I had once an idea for Progressive Loading, that allowed "loading" any amount of combo, even let's say 10gb, without overflowing the memory at all (like Reading it full does). Imho its better than loading into chunks because depending on size of combo. Quote Share this post Link to post Share on other sites
AnimuCracku 98 Backgroundworker or load data asynchronous to wherever you want I use this method when doing shit which lags out my programs. However the read only if need method should be good too. :hype: Quote Share this post Link to post Share on other sites
dread 1 I think title says it all. I'm currently using a StreamWriter and adding each line to a Hashset, but combos of 1MILL and above, take around 40 seconds to load. Is there a faster way? thank you very much let's try it Quote Share this post Link to post Share on other sites