Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gnome-shell gnome-shell
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,837
    • Issues 1,837
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • gnome-shellgnome-shell
  • Merge requests
  • !923

js/ui: Keep refcounts to WallClock objects above 1

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Daniel van Vugt requested to merge vanvugt/gnome-shell:ref-WallClocks into main Jan 09, 2020
  • Overview 26
  • Commits 1
  • Pipelines 17
  • Changes 3

Because if you let them bounce between 1 and 2 then they will trigger toggle references every time the object's properties change (maybe every second). Even if you're not subscribed to notify::clock but subscribed to notify::timezone then it's still a problem as the ref/unreffing happens within the GObject notify logic, even if the subscription detail means you don't get those callbacks.

Now because the toggle references on WallClock objects are not toggling down any more, they won't queue the "big hammer" garbage collection to run every 10 seconds (gjs@e9e96955). And CPU spikes from that regular garbage collection (which also caused visible stutter sometimes) are avoided.

Closes: #2085 and #4800

Edited Dec 01, 2021 by Daniel van Vugt
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: ref-WallClocks