Up to Main Index                           Up to Journal for January, 2016

                   JOURNAL FOR SATURDAY 23RD JANUARY, 2016
______________________________________________________________________________

SUBJECT: Minor update to public dev branch
   DATE: Sat 23 Jan 23:42:23 GMT 2016

This week I've been working on updating the currently implemented commands to
use the new State.where field which is stashed when we add the initial lock at
the start of processing a command. Only a minor performance and tidy up gain
but it saves having to do this for nearly every command:


  if a := attr.FindLocate(s.actor); a != nil {
    where = a.Where()
  }

Next job will be to update the commands to provide feedback to other players.
For example if you examine something it will notify other players that you are
examining something.

While working on the commands I've fixed a few bugs and made some other minor
changes which I've pushed up to the Git public dev branch.

I've fixed a long outstanding bug: If you just hit enter it moved the cursor
to a new, blank line. Now it redisplays the prompt correctly. Minor, but very
annoying - to me anyway.

I've fix a bug in the parsing to do with entering a command that expected
arguments. For example:

  >get
  You see not 'GET' to get.
  >

It should show:

  >get
  You go to get... something?
  >

This is now fixed.

For people using machines with limited resources we now shrink the player list
slice when the last player logs out and the slice capacity is over 10 slots.

Again related to memory there is a new config.Stats.GC knob in config.go. This
is a bool and if set forces a GC and FreeOSMemory before the latest stats are
collected. If not set Go will do it's normal GC and scavenging when it wants.

Related, the Stats now reported by the server now show HeapSystem instead of
Alloc from the MemStats. This should provide a better picture of what is
happening:

  2016/01/23 14:48:24 stats.go:100: M[ 704kb -64kb] O[ 704 +73] G[ 10 +2] P 0/0
  2016/01/23 14:48:34 stats.go:100: M[ 704kb  +0b ] O[ 725 +21] G[ 10 +0] P 0/0
  2016/01/23 14:48:44 stats.go:100: M[ 672kb -32kb] O[ 739 +14] G[ 10 +0] P 0/0

Where M[] is memory/change in memory, O[] is objects/change in objects, G[] is
goroutines/change in go routines and P/ is current players/max players at one
time. The change values are the difference since the last stats collection.
The labels have also been shortened from M,HO,GO,PL to M,O,G,P.

With forced GC turned off and using the new stats 60,000 players connected
takes 240Mb and peaks at 750Mb. According to top's RES it's more like 750Mb
peaking at 805Mb. Then again I can have stats show 750Mb and top show 85Mb! So
now I just don't know... *sigh*

So only minor updates made while working on other bits, but they are out there
if you want them.

--
Diddymus


  Up to Main Index                           Up to Journal for January, 2016