Reduce temporary allocations in the DesktopFileParser

Review Request #128944 - Created Sept. 19, 2016 and discarded

Information
Aleix Pol Gonzalez
kcoreaddons
master
Reviewers
kdeframeworks

While analising plasmashell under heaptrack, one of the sore spots is temporary allocations within DesktopFileParser. This improves the situation by:

  • Only converting to QString/utf8 once.
  • Using QStringRef instead of fully splitting QString to parse them.

tests still pass, plasma still works normally.

heaptrack plasmashell:

after:
allocations: 4169312
leaked allocations: 83225
temporary allocations: 606902

before:
allocations: 4680691
leaked allocations: 84825
temporary allocations: 819292

Issues

  • 1
  • 3
  • 2
  • 6
Description From Last Updated
if this compiles before and after, then you should set the defines that prevent implicit string conversions and fix all ... Milian Wolff Milian Wolff
Alex Richardson
Mark Gaiser
Aleix Pol Gonzalez
Milian Wolff
Milian Wolff
Aleix Pol Gonzalez
Review request changed

Status: Discarded

Change Summary:

This won't ever work properly, I'm aiming for not running this code at all (at runtime at least).

Loading...