Use the right scope for the installpath variable
ClosedPublic

Authored by apol on Jun 5 2017, 3:28 PM.

Details

Summary

Only mark package as installed if it was successfully extracted

Don't store all installed files in the knsregistry file

At the moment we were storing every file, for big packages (for example
icon themes like Papyrus) this meant ~5 MiB of paths that had to be loaded
when the engine was created.
This patch makes it so instead of adding all the contents of the directory
it will only list the extracted directories so they can recursively be
removed. I don't think it's a supported workflow to be adding stuff in an
extracted directory anyway.

Test Plan

Tests pass, tried un/installing massive icon themes. Also massif
reports a much lower memory consumption.

Diff Detail

Repository
R304 KNewStuff
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jun 5 2017, 3:28 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 5 2017, 3:28 PM
leinir accepted this revision.Jun 6 2017, 9:15 AM

Personally less fond of auto than you are... But, that is just me, and this is a framework, and it's fine :) A massive reduction in allocations is a very good thing, go for it :)

This revision is now accepted and ready to land.Jun 6 2017, 9:15 AM
This revision was automatically updated to reflect the committed changes.