← Back to team overview

hugin-devs team mailing list archive

[Bug 792781] Re: Manage Scheduling Priority of PTBatcherGUI

 

Yes, the term "nice" is platform dependent.

However, running the batch processes at a lower CPU priority (and if
possible, a  lower IO priority as well) is a cross platform issue.

Even if windows wouldn't support it, the support can and should be
conditional on the compilation environment. There is OS interaction, so
there will be some OS dependent code.

In unix, a process can set its CPU priority with a system call. All
children will then inherit this priority. If you have to use "wxExecute"
which doesn't have a priority argument, you can write a wrapper that
does:

wxPrioExecute (int prio, ....) 
{
   if (!fork ()) 
      nice (prio); 
      wxExecute (....);
      exit ();
   }
}

It could ignore the argument on Windows, or leave the implementation for
a later moment when someone with the proper windows skills comes along.

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Hugin.
https://bugs.launchpad.net/bugs/792781

Title:
  Manage Scheduling Priority of PTBatcherGUI

Status in Hugin - Panorama Tools GUI:
  Triaged

Bug description:
  YL > Wishlist for PTBatcherGUI
  YL > * add a switch to start it "nice" (to leave priority to the user
  YL > interaction with Hugin)

  TM > What is "nice"? That's a very weak description. I don't know what you
  TM > want.

  I don't now if this exists in Windows.  In Linux (and I guess also on
  the Mac), I can start a command with `nice -n X COMMAND ARGS` and it
  has higher or lower scheduling priority depending if X is negative or
  positive.  Details in `man nice`.

  I guess I could pre-pend the nice command in the call from
  PanoPanel.cpp but I am not sure how this would (or would not) affect
  the whole thing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/hugin/+bug/792781/+subscriptions


References