Fix insane delay in report items creation
ClosedPublic

Authored by staniek on Nov 1 2019, 6:58 PM.

Details

Summary

Fix insane delay in report items creation by not instantiating hi-resolution QPrinter object for each item.

To be honest I am not understanding the whole word-wrapping algorithm used here.

Test Plan

Approach 1: Run KEXI and create report with large number of pages. Use at
least one text element.
Before the fix there's noticeable O(N) delay.

Approach 2: Also if we enter static value for the text item the kreportexample
app, there is noticeable delay on each key press before this fix.

Expected: all is smooth after the fix.

Diff Detail

Repository
R14 KReport
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
staniek created this revision.Nov 1 2019, 6:58 PM
Restricted Application added a project: KReport. · View Herald TranscriptNov 1 2019, 6:58 PM
staniek requested review of this revision.Nov 1 2019, 6:58 PM
piggz accepted this revision.Nov 4 2019, 9:34 PM

LGTM

This revision is now accepted and ready to land.Nov 4 2019, 9:34 PM
This revision was automatically updated to reflect the committed changes.