Results 1 to 14 of 14

Thread: Reading large unsorted file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Reading large unsorted file

    Quote Originally Posted by GSS View Post
    I'll give a try to the the QtConcurrent.
    No point in doing that, QtConcurrent is for parallelizing multiple tasks, you only have one task.

    Quote Originally Posted by Lesiok View Post
    As I see You don't reset map2. So after next line map2 contains all lines from begin to current.
    I think that first line in whie loop should be :
    Qt Code:
    1. map2.clear();
    To copy to clipboard, switch view to plain text mode 
    No, every loop iteration is a single record.

    The loop needs to work with map3 and only with map3.

    Something like
    Qt Code:
    1. map3[list1[0].insertMulti(list1[1], list1[2]);
    To copy to clipboard, switch view to plain text mode 
    i.e. retrieve or create the inner map for key "list1[0]" then insert the current inner pair, allowing multiple values for key "list1[1]"

    Since the result is written back into files again, one could probably even avoid the encoding and decoding and just work with QByteArray instead of QString.

    Is the machine's physical RAM large enough to do that without swapping?
    Such a long time sounds like as if the machine started swapping.

    Cheers,
    _
    Last edited by anda_skoa; 18th July 2016 at 11:08.

Similar Threads

  1. Advice: Reading large text file.
    By enricong in forum Qt Programming
    Replies: 7
    Last Post: 16th July 2011, 12:11
  2. High performance large file reading on OSX
    By mikeee7 in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2009, 14:18
  3. To large exe file
    By wydesenej in forum Installation and Deployment
    Replies: 8
    Last Post: 24th January 2009, 21:44
  4. large file handling
    By sakthi in forum Qt-based Software
    Replies: 1
    Last Post: 30th October 2008, 00:34
  5. large file management
    By sakthi in forum Qt Programming
    Replies: 1
    Last Post: 22nd October 2008, 08:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.