Aller au contenu

Photo

PW server UI performance questions


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

I've been facing this dilemma as I'm worried about server performance with some UI I've been making, especially since some of them have updates that execute server scripts rather frequently (like twice per second).

Now a few questions:

 

1) Is an update rate of 0.5 (twice per second) less "stressful" than the default one? I would imagine yes as I've read that the default one is done once per fps (so 30 or 60 times per second), but I'm not completely sure about it.

 

2) If I have an UI that automatically calls scripts with updates, should I make it expire (with idleexpiretime) or not after closing it? Windows that do not expire continue recalling the scripts even when they're closed?

 

Thanks in advance for the answers.



#2
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

I've been facing this dilemma as I'm worried about server performance with some UI I've been making, especially since some of them have updates that execute server scripts rather frequently (like twice per second).
Now a few questions:
 
1) Is an update rate of 0.5 (twice per second) less "stressful" than the default one? I would imagine yes as I've read that the default one is done once per fps (so 30 or 60 times per second), but I'm not completely sure about it.
 
2) If I have an UI that automatically calls scripts with updates, should I make it expire (with idleexpiretime) or not after closing it? Windows that do not expire continue recalling the scripts even when they're closed?
 
Thanks in advance for the answers.


Hi C86,

Have you access/read my tutorial on this? (I only mention it in case you would like more info.)

From the tutorial (http://neverwinterva...ng-beginners):-

UpdateRate=(float value) Set a value in seconds (or part of) to tune the speed of an update on an object. (E.g. 0.5 for every half a second.)

idleexpiretime=(float value)Lowers the time the scene stays in memory rather than read from the hard drive. If you need the scene to refresh with new data, then this needs adding with a low setting.The lowest value I have found is “0.1”


So, to answer your questions (as I understand it):-

1) Yes, "0.5" is less stressful than the default one.

2) As far as I am aware, XML code only "calls" info when it is open. However, it only "flushes" this information according to the "idleexpiretime" value.

Depending upon how you have set up your GUI and how data is to be updated or refreshed will determine what you need to do with these attributes.

In my experience, "performance" issues are not normally affected by either of these two from an XML point of view, and is more to do with any scripts involved in calling them in the first place (and how frequent data passes need to be).

If you want to describe a bit more what your XML is doing with respect to your script, then perhaps I can offer some more advise?

Cheers,
Lance.



#3
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

Thanks for the answer, Lance.

I have 4 XMLs for 4 different party bars to replace the default party bar (two styles and left, like in a MMO, or right, standard).

Only one of those party bars can be active at the same time, and I was wondering if I should make them expire or not when they're closed, I was worried that if I didn't make them expire I would have 4 party bars running in the background at the same time.

 

Screenshot:

nwn2ss030916221701.jpg



#4
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

Hi C86,

 

Once a GUI is closed, it does not do anything (as far as I recall).

 

The idleexpiretime is only relevant (as far as I can see) if your player intends to keep on opening and closing said GUI. For instance, if these GUIs remain up/open once selected, then there is no need to add any idelexpiretime at all. (Just leave it as the default.) The update code then updates the "open GUI" whenever code changes or when the refresh refreshes (which you say you have set at 0.5). Again, I would say that if these tend to stay "open" once selected, then there is no need to alter the updaterate either, as the game is designed to handle such updated quite easily, especially if there is not too much to update.

 

An example of when idelexpiretime needs to be added is if you are opening and closing a GUI and something has changed since last opening. I have some GUIs that open and close themselves because something about them has changed. To ensure the data has changed, I need to make sure the engine reads the new data from the hard drive rather than rely on what was there before.

 

Cheers,

Lance.


  • Clangeddin86 aime ceci

#5
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

I see, thanks for the explanation, just one more question.

Expiring the UI saves RAM?



#6
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

I see, thanks for the explanation, just one more question.
Expiring the UI saves RAM?


Hi C86,

Maybe ... ? ;) Although, how much it actually uses is probably miniscule. I would be interested to hear if it makes a difference on a large server where the GUI is potentially being opened and then closed a significant amount.

Just for your info, I decided to work on the party bar today, as (since beta testing), I am finding it frustrating having to keep scrolling along the PCs to get to the one I want. I am considering reducing image sizes, slim-lining the bar as a whole, and even considering (if possible) making "summons" stay out of the list. (I may make that last one an option.)

Cheers,
Lance.