• April 27, 2024, 06:43:51 pm

Author Topic: Changing Symbian Process priority  (Read 3667 times)

0 Members and 1 Guest are viewing this topic.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Changing Symbian Process priority
« on: November 30, 2013, 01:31:38 am »
Here is how to change the process priority of your Symbian Application.

Libs required (for Qt usage):
Code: [Select]
-lavkon -leikcore- lcone
Includes:
Code: [Select]
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>

Now the rest:
Code: [Select]
CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
    RProcess pMyApp;
    pMyApp.SetPriority(EPriorityHigh);

Obviously if you change the RProcess name from pMyApp remember to change it on the next line.

« Last Edit: November 30, 2013, 01:36:24 am by Allstar12345 »

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Changing Symbian Process priority
« Reply #1 on: November 30, 2013, 10:51:57 am »
looks intresting :)
Will try it later, but I think not need all the headers and libaries are needed.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Changing Symbian Process priority
« Reply #2 on: November 30, 2013, 01:28:29 pm »
Probably won't need appui headers, they are for CaKnppUi.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212
Re: Changing Symbian Process priority
« Reply #3 on: November 30, 2013, 08:21:25 pm »
exactly :P
and if you include a Avkon class (like aknappui.h) you don't have to include the related cone or uikon classes, because avkon itself already includes uikon and cone classes.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Changing Symbian Process priority
« Reply #4 on: November 30, 2013, 08:42:05 pm »
I know, I was using those headers on something seperate  :P

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Changing Symbian Process priority
« Reply #5 on: November 30, 2013, 08:42:27 pm »
I know, I was using those headers on something seperate  :P

Offline yeatse

  • Developer
  • Viewer
  • ****
  • Posts: 8
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : 808
Re: Changing Symbian Process priority
« Reply #6 on: December 31, 2013, 06:43:01 am »
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808
Re: Changing Symbian Process priority
« Reply #7 on: January 06, 2014, 09:25:22 pm »
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.
Is there any documentation about this so i can understand it more?

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: Changing Symbian Process priority
« Reply #8 on: January 06, 2014, 10:10:23 pm »
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.

Ah, good one.

Offline huellif

  • Developer
  • Christmas Santa
  • ****
  • Posts: 402
  • Reputation: 212

Offline symster

  • Developer
  • Happy Member
  • ****
  • Posts: 214
  • Reputation: 6
  • Symbian Power User
  • Current Phone: : Nokia N8 Soon Nokia 808