Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
G
gcmh
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1
    • Merge requests 1
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Koral
  • gcmh
  • Merge requests
  • !2

Merged
Created Aug 07, 2019 by Stuart Hickinbottom@hickinbottomsContributor

Feature/prevent duplicate timers

  • Overview 5
  • Commits 3
  • Changes 1

(Thanks for creating gcmh. I'm using it on both Windows and Linux and it's especially helpful on Windows.)

I found that when combined with desktop-save-mode, upon session reloading in a new Emacs instance, then gcmh-mode would be enabled multiple times even when it was already active. This causes multiple duplicate idle timers to be created (one for each time the mode is enabled).

The same effect can be provoked by manually running (gcmh-mode t) multiple times.

The effect of this is garbage collection being executed multiple times each time the idle time expired.

I noticed this because GC was slower than expected, and turning on gcmh-verbose revealed all those duplicate GC events each time Emacs had been idle.

This change simply removes any extant timer before enabling the mode so we're guaranteed to only have one or zero idle timers defined.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feature/prevent-duplicate-timers