Configurable process priority

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Shirasik
Inserter
Inserter
Posts: 30
Joined: Mon Apr 28, 2025 12:17 pm
Contact:

Configurable process priority

Post by Shirasik »

TL;DR
New option: process priority that Factorio will configure for itself on startup.

What?
You know that process priorities that you may configure for running processes. The thing is, processes are allowed to configure their CPU priority in most cases. So instead of going through task manager every time when I launch Factorio to set its priority to IDLE I want Factorio to configure it by itself.
Why?
Let's say I playing Factorio using primary display. My family wants to watch some movie. Or something at YouTube or something like that. So we connect HDMI TV LED to PC, expanding display area to TV display, dragging browsers with YT there and launching whatever they want to watch. To make this work, we need to configure video output, audio output and make sure what YT will not catch any processing lags. The latter can be done either by raising 'TV'-media priority above average (what may lead to system instability) or by lowering priority of some other stuff below average.
Media streams actually don't need much processing power as mostly they just produce load spikes every time they need to refill frame buffer. So in essence they need brief intense I/O and calculations while sitting still most of the time. So when mediastream needs to refill buffers I wish to let it done that as fast as possible. Me, while playing Factorio, hardly will even notice if every 20th frame will take, I don't know, 11ms instead of 10 to being fully processed.
Factorio already allows to configure Factorio's display and audio output letting OS default settings be. With configurable priority the overall experience will be smooth ever more than now.
Plus, whole implementation is like couple of lines to call OS' API function and extra line in settings UI.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15965
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Configurable process priority

Post by Rseding91 »

Have you actually had issues with video playback while Factorio is open and then changed the priority for the Factorio process and had it fix the issue?

Factorio doesn’t touch the disk while it’s running except when saving or loading a map - which is not common.
If you want to get ahold of me I'm almost always on Discord.
Shirasik
Inserter
Inserter
Posts: 30
Joined: Mon Apr 28, 2025 12:17 pm
Contact:

Re: Configurable process priority

Post by Shirasik »

Rseding91 wrote: Wed Jul 30, 2025 12:01 am Have you actually had issues with video playback while Factorio is open and then changed the priority for the Factorio process and had it fix the issue?
Having a visible lag sometimes when switching between surfaces fastly (using arrow keys) if surfaces are zoomed out and has dense development. Or if there are many particles e.g. when fast-moving platform loaded with eggs is rushing towards promethium asteroids. Or when such platform collects promethium. Or when another fast platform rushing to Nauvis to deliver Gleba products. I can accept the lag in Factorio but it impacts playback. This isn't ordinary stuff and it happens sometimes but any even single per hour playback lag disrupts the experience. Lowering Factorio's priority solves the issue.
Rseding91 wrote: Wed Jul 30, 2025 12:01 am Factorio doesn’t touch the disk while it’s running except when saving or loading a map - which is not common.
PCs are complex enough to have I/O throughput caps other than disk I/Os. RAM I/O including CPU cache due to intense calculations all over the game world so Factorio can impact mediaplayer's main threads. Modern GPUs are like another whole PC in your PC and Factorio's particle graphics isn't quite FPS friendly so it can impact GPU background activities such as video decode despite GPUs having different dedicated ALU cores for the tasks.

All in all, that's maybe my rig is a potato according to today standards. Anyway for the cases when background tasks are essential, proposed solution is simple imho.
Tertius
Smart Inserter
Smart Inserter
Posts: 1372
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Configurable process priority

Post by Tertius »

Such a setting is dangerous. People will detect it, and some will assume: "Factorio will run faster if I turn this up" when they see Factorio is just using 25% CPU on their 16 core high end CPU and runs their megabase with only 40 UPS, then open a bug report when they see the setting doesn't change anything.
Shirasik
Inserter
Inserter
Posts: 30
Joined: Mon Apr 28, 2025 12:17 pm
Contact:

Re: Configurable process priority

Post by Shirasik »

Tertius wrote: Wed Jul 30, 2025 8:57 am Such a setting is dangerous.
In the same way as changing priority in task manager.
Tertius wrote: Wed Jul 30, 2025 8:57 amPeople will detect it, and some will assume: "Factorio will run faster if I turn this up" when they see Factorio is just using 25% CPU on their 16 core high end CPU and runs their megabase with only 40 UPS, then open a bug report when they see the setting doesn't change anything.
Some settings has info popups. So for the proposed one text may be like "Don't affect performance. Lower priority helps Factorio not to impact background tasks if you running any important while playing Factorio.".
Post Reply

Return to “Ideas and Suggestions”