Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Kirigami
Kirigami
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Frameworks
  • KirigamiKirigami
  • Merge Requests
  • !212

Merged
Opened Jan 15, 2021 by Arjen Hiemstra@ahiemstraDeveloper3 of 4 tasks completed3/4 tasks

Make PlatformTheme share data when possible

  • Overview 22
  • Commits 9
  • Changes 17

In an average application, there will be a lot of PlatformTheme instances, since they will be attached to almost every object. However, PlatformThemePrivate is currently almost 800 bytes large. Along with some other things, this means we are using a lot of memory for each PlatformTheme instance.

This MR changes things by having the data shared between instances of PlatformTheme when they inherit. This greatly reduces the number of actual data objects that are needed, since the majority of PlatformTheme instances will inherit. On a slightly contrived test with 10000 items (and 10000 PlatformTheme instances) this reduces memory usage from 110MB to 70MB, though for that result additional changes are needed in qqc2-desktop-style's plugin.

To ensure things are working the way they should, this also includes an autotest to verify PlatformTheme's behaviour.

Draft because:

  • test_inherit in the autotest currently fails.
  • test_override in the autotest currently fails.
  • BasicTheme needs to be updated and improved.
  • Needs lots more testing.
Edited Feb 02, 2021 by Arjen Hiemstra
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: frameworks/kirigami!212
Source branch: work/ahiemstra/platformtheme