Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.11
-
None
-
54204fc79 (dev), c59e6b534 (6.10)
Description
The tst_QTextStream::pos3LargeFile() test shows quadratic behaviour in the size of the test file:
File Size [KiB] | Run Time [ms] |
---|---|
1 | 34 |
2 | 108 |
4 | 783 |
8 | 2243 |
16 | 13742 |
32 | 91884 |
50 | 293146 |
If I comment out the pos() calls, it takes 18ms for 50KiB.
Even if the stream has to back off, this shouldn't take time linear in the file size or the position in the file. It should be possible to implement this in amortized constant time, which would make tst_QTextStream::pos3LargeFile() linear in the size of the test file.
Attachments
Issue Links
- covers
-
QTBUG-138428 tst_QTextStream::pos3LargeFile() takes an extraordinary amount of time to execute
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-138435 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
660531,1 | tst_QTextStream: scope a variable closer (and init it) | dev | qt/qtbase | Status: NEW | +2 | 0 |
660533,5 | tst_QTextStream: make pos3LargeFile() actually test pos() | dev | qt/qtbase | Status: NEW | 0 | +1 |
660527,5 | tst_QTextStream: reduce the runtime of pos3LargeFile() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
660584,2 | tst_QTextStream: reduce the runtime of pos3LargeFile() | 6.10 | qt/qtbase | Status: MERGED | +2 | 0 |
660660,1 | tst_QTextStream: reduce the runtime of pos3LargeFile() | 6.9 | qt/qtbase | Status: STAGED | +2 | 0 |