Fix insane delay in report items creation

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

Description

Fix insane delay in report items creation

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.

Reviewers: piggz

Reviewed By: piggz

Subscribers: Kexi-Devel-list

Tags: KReport

Differential Revision: https://phabricator.kde.org/D25108

Details

Committed
staniekNov 4 2019, 9:43 PM
Reviewer
piggz
Differential Revision
D25108: Fix insane delay in report items creation
Parents
R14:d81acc443b55: GIT_SILENT Remove unnecessary includes
Branches
Unknown
Tags
Unknown