Skip to content

Whenever chosen 'trigger' processes (e.g. video games) are running, TaskTamer automatically tames chosen 'target' processes (e.g. web browsers, instant messaging apps, and game launchers), and automatically restores them when the trigger process ends. Taming can involve suspending a process, setting it to Low priority, and closing it

License

Notifications You must be signed in to change notification settings

BenKennish/TaskTamer

Repository files navigation

TaskTamer

Summary

Whenever chosen trigger processes (e.g. video games) are running, TaskTamer automatically "tames" (throttles) chosen target processes (e.g. web browsers, game launchers, and instant messaging apps), and automatically restores them when the trigger process ends.

Benefits

  • Effortless Game Updates: Automatically download game updates when you're not gaming, by keeping all your game launchers running, but without a launcher downloading updates and interrupting a game that you launched with a different launcher.

  • Pause Background Data Hogs: Suspend messaging apps like WhatsApp and Signal to prevent unexpected downloads of large files (e.g., high-resolution photos or videos) that could cause lag when gaming.

  • Free Up Browser Resources: Throttle your web browser with its many open tabs to stop background tasks and free up valuable RAM, ensuring smoother gameplay.

How It Boosts Performance

The precise nature of the taming (throttle) can be defined in the config file, including a choice of suspending a process (the default), setting it to "Below Normal" priority, closing it, or doing nothing. Target processes can also have their windows minimized, have their RAM usage ("working set") trimmed, and be defined as a launcher which means they will not be affected if they were responsible for launching the trigger process.

Suspended target processes are effectively frozen and therefore can't slow down the trigger process (or any other running process) by using CPU or accessing the disk or network in the background. Windows is also more likely to move memory used by target processes from fast RAM to the slower pagefile on disk, which leaves more speedy RAM available for the trigger process to use.

When the trigger process closes, TaskTamer will report how much the RAM usage of the target processes (known as their "working set") decreased while they were tamed.

TaskTamer can perform other tricks using the config file (see Configuration) and through various Parameters

Installation

This project is hosted as a module in the Powershell Gallery so it can be installed very easily.

Open a Windows PowerShell terminal (hit the Windows Key on keyboard, type "windows power", and hit enter) and run the following commands, hitting "y" and enter when prompted.

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Install-Module -Name TaskTamer -Scope CurrentUser

Running

Once the module is installed, you can run TaskTamer (from the PowerShell terminal) by entering the following:

Invoke-TaskTamer

You can also use the alias TaskTamer in PowerShell instead of Invoke-TaskTamer. Once you've run TaskTamer for the first time, you will find a shortcut in your Start Menu called "Task Tamer" which you can use to run it easily in future.

There are some Parameters that you can use to pass to Invoke-TaskTamer to alter the operation.

Configuration

You can configure the module by modifying the config.yaml file. You will find this in %LOCALAPPDATA%\TaskTamer (e.g. C:\Users\Ben\AppData\Local\TaskTamer) after you run TaskTamer for the first time. Whenever you run it, config.yaml is autocreated (if it doesn't already exist) using config-template.yaml as a template. So just run Invoke-TaskTamer once before configuring it.

Keep the spacing and formatting in config.yaml as it is otherwise TaskTamer won't be able to read it properly.

Parameters

Here are the optional parameters that alter the way the TaskTamer operates. You can also see them by running Help Invoke-TaskTamer.

Parameter Description
‑WhatIf Enables "what if" mode; the script doesn't actually take any action on target processes but does everything else. Useful for testing and measuring performance benefits of using TaskTamer.
‑ResumeAll Immediately resumes all target processes then run as normal. Handy for when a previous launch of the script failed to resume everything for some reason.
‑CheckOnce Checks for trigger processes only once, exiting immediately if none are running. If one is running, performs usual operations then exits when the trigger process exits (after resuming the target processes). Useful if you arrange for the script to run every time Windows runs a new process.
‑PollTriggers Poll the status of the trigger process, rather than waiting to be told by Windows when it has stopped, which allows mointoring memory usage. This can be useful for gathering benchmarking data, but it can have a small performance impact so is disabled by default.
‑Verbose The script will be more descriptive about what's going on.
‑Debug Enables debugging mode, useful for anyone wishing to fix bugs in the script.

Uninstalling

To uninstall TaskTamer, run this command in PowerShell:

Uninstall-Module -Name TaskTamer -AllVersions

You can also optionally delete the folder %LOCALAPPDATA%\TaskTamer.

Source Code

This project has a public GitHub repo.

About

Whenever chosen 'trigger' processes (e.g. video games) are running, TaskTamer automatically tames chosen 'target' processes (e.g. web browsers, instant messaging apps, and game launchers), and automatically restores them when the trigger process ends. Taming can involve suspending a process, setting it to Low priority, and closing it

Topics

Resources

License

Stars

Watchers

Forks