[Qt-interest] QPlainTextEdit and files larger than 1G

Arnold Krille arnold at arnoldarts.de
Wed Oct 28 19:50:09 CET 2009


On Wednesday 28 October 2009 17:51:22 Roland Krause wrote:
> Is there some sort of magic size limit on how large of a file a
> QPlainTextEdit can display.
> I am reading a rather large (~1.8G) file with the following code but after
> pretty much exactly 1000 blocks the application completely stalls. At that
> point memory consumption is about 3.6G res according to "top".

What kind of thing do you want to achieve with 3.6GB text-files read into 
memory at once?

I do understand the need for tables (in .csv or similar) being several gigs. I 
use these myself. But I can't really think of any sane reason to have the full 
file in memory. Let alone any reason to render the full file in a textedit?

Possible solutions:
a) re-think the need to have such big files in a text-editor.
b) load (and process) the file in smaller chunks.

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091028/7a7aec4a/attachment.bin 


More information about the Qt-interest-old mailing list