Why Can't Qt Creator Open Large Files?



  • Hi; I'm using Qt Creator and Sublime Text 3. I got a large cpp file of 1.571.851 lines. If I'm trying open this file with Sublime Text 3, it's opening: Gif Link. If I'm trying open this file with Qt Creator, I get this message:
    alt text
    When I click 'Yes' button, Qt Creator is slowing and it's freezing.
    Why can't Qt Creator open large files? Thanks.


  • Lifetime Qt Champion

    Hi,

    What version of Qt Creator are you using ?

    One main difference between Sublime Text and Qt Creator, Qt Creator create a code model for your file which means it parses all the files and tries to get all information about what if finds between variables, methods, includes etc. which Sublime doesn't.

    On a side note, such a big .cpp is pretty uncommon, what do you have in there that requires that much code ?


  • Qt Champions 2017

    Hi @Ibrahim, Creator does not just open and display the file, it runs a code parser over it. And indeed, for a 45 MB CPP file this may be slow.

    Why do you need to open it anyway? I guess this file is generated and should not be edited by hand.



  • @SGaist and @aha_1980 thanks.

    What version of Qt Creator are you using ?

    Qt Creator 4.4.1

    what do you have in there that requires that much code ?

    This is just a test.

    Why do you need to open it anyway?

    Just a test.

    Note: Qt Creator is opening files of 50.000 lines quickly.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.