What steps will reproduce the problem?
1. dd if=/dev/urandom of=/tmp/test.txt bs=1024 count=256
2. go to uri file:///tmp/test.txt
What is the expected output? What do you see instead?
Mozilla shows this file in about 1 second.
QtWebKit from Qt 4.4
Please provide any additional information below.
Showing this file takes about 60 seconds on my machine.
I tracked down the issue to the fact that in bidi.cpp we are calling nextBreakablePosition over and over which constructs a QTextBoundryFinder
I started hacking around and made a branch that passes all of the tests and re-uses the iterator when possible, but it is a bit of a hack and when you enable the other iterator caches there are three failures which doesn't make any sense... And it can still crash an iterator is created, the string is deleted a new string is created at the same location in memory, but with a different lenght and a new iterator is created with it. We should just see about re-using the same iterator upstream.
Probably worth looking into what the average length is. Maybe we could get rid of the buffer
There have recently been some commits that could improve this:
Can you tell me if this is still an issue?
Created attachment 44137 [details]
Large text file
Example generated using:
dd if=/dev/random bs=1024 count=256 | base64 > large.txt
The bug is still present, reloading this file locks the browser for 20 seconds, it loads instantly in firefox.
This bug has to be fixed for QtWebKit 2.0
*** This bug has been marked as a duplicate of bug 31719 ***
Shouldn't that one be a duplicate of this issue as this is the older issue?
I opted for keeping the other one since it had more useful information.