Author Topic: A solution to speed-up PlaneShift on slow computers  (Read 2461 times)

Giraut Mawhrin

  • Traveller
  • *
  • Posts: 30
    • View Profile
A solution to speed-up PlaneShift on slow computers
« on: December 02, 2007, 04:22:21 am »
Hello everybody,

I made a little patch that helps speed up the game enormously. The patch adds a command key to enable/disable the creation of labels above players and items. The labels, strangely enough, are real CPU pigs. When I disable them with the patch (which, incidentally, truly disables them, unlike the option in the game's menu), I get a 20 FPS speed increase in areas such as the path from the north tower to the plaza, the stairway to the tavern, or the Akkaio gate. This makes the game completely playable even on a lowly computer like mine.

Here's a link to the patch:

http://users.skynet.be/ppc/planeshift/planeshift_disablelabels_patch.tar.gz

It comes with a README that tells you how to install it and use it. Of course, you need to be able to recompile the client, and I've only tested it under Linux, but I see no reason why it wouldn't work on other platforms.

I hope this helps!

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #1 on: December 02, 2007, 04:47:03 am »
Yes, entity labels are our biggest resource hog by far. The method used to create them is very expensive unfortunately.

Quick question, doesn't disabling labels in the ingame options have the same affect?

Giraut Mawhrin

  • Traveller
  • *
  • Posts: 30
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #2 on: December 02, 2007, 04:53:57 am »
Yes, entity labels are our biggest resource hog by far. The method used to create them is very expensive unfortunately.
Quick question, doesn't disabling labels in the ingame options have the same affect?

No, when you set labels invisible, they're still created each time an object arrives, they're just not displayed, which is why you see exactly no speed improvement when you disable them in-game.

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #3 on: December 02, 2007, 05:03:28 am »
If you can make a patch to 'fix' that option so it doesn't create them, maybe so it doesn't create them for the mouseover option either (until you mouseover), then I'd be most grateful :)

Rongar Elani

  • Hydlaa Citizen
  • *
  • Posts: 329
  • "post count +1" ~~Neko Kyouran
    • View Profile
    • Guild forums of 'The Awakened'
Re: A solution to speed-up PlaneShift on slow computers
« Reply #4 on: December 02, 2007, 07:41:27 am »
Oh, that'd be excellent. I didn't even know that the labels are that much of a problem, which is why I had them on "always visible" all the time. :sweatdrop:

Thanks for your efforts, Giraut! :thumbup:

                                                           A w a k e n!

Vornne

  • Testers
  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #5 on: December 02, 2007, 10:12:39 am »
I will just add some recent output from the svn log:

------------------------------------------------------------------------
r312 | kemedes | 2007-11-28 09:34:56 +1300 (Wed, 28 Nov 2007) | 1 line

- Entity labels are only rendered when needed, not always.
------------------------------------------------------------------------

From looking at the diff, it seems they are not created if the option is set to never show labels. Though still you could look at the svn trunk code and make a patch to stop it creating them until mouseover, like Xordan wanted.

But nice work ;)

Aiken

  • Hydlaa Resident
  • *
  • Posts: 93
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #6 on: December 02, 2007, 10:35:29 am »
Would be nice if it is already implemented in truck. I have a patch that has the same result. With performance the increase when entity labels are not even created is enough to not worry about using labels most of the time. Earlier I did a few runs from Percy to Harn. I have the fps indicator in the bottom left corner

The results of a few runs
all labels -> min fps 6
invisible labels -> min fps 6
no labels -> min fps 17

That is with adaptive turned off and distance set to 1,000.
Beware the grue.

Makiraren

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #7 on: December 08, 2007, 01:41:25 am »
I didn't get a readme file with the patch.  Can you tell me where I can get it?

Aiken

  • Hydlaa Resident
  • *
  • Posts: 93
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #8 on: December 08, 2007, 03:28:56 am »
The download should contain 2 files. One of them called README.
Beware the grue.

Makiraren

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #9 on: December 08, 2007, 04:45:35 am »
I've tried it twice, and all I get is the patch file with a .tar extension.  Maybe it's just me.

Aiken

  • Hydlaa Resident
  • *
  • Posts: 93
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #10 on: December 08, 2007, 06:06:09 am »
Open the tar file.

.tar = archive of files
.tar.gz = compressed tar file
Beware the grue.

Makiraren

  • Wayfarer
  • *
  • Posts: 9
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #11 on: December 08, 2007, 06:20:56 am »
Ahh, much better.  Thank you.

Tuxide

  • Hydlaa Notable
  • *
  • Posts: 715
    • View Profile
    • Banker
Re: A solution to speed-up PlaneShift on slow computers
« Reply #12 on: December 08, 2007, 10:50:01 am »
Yes, entity labels are our biggest resource hog by far. The method used to create them is very expensive unfortunately.
Is this true with the text in the chat window as well?  I notice the longer I let psclient run on Laanx (for, say, several hours), the more it lags until I reach a point where my connection times out.  Even when I do nothing but sit in the tavern for six hours.

Tontow

  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #13 on: December 08, 2007, 07:20:30 pm »
I have a question.

Are labels destroyed when no longer needed?  If they aren’t then that’s a big memory leak……..
Tontow's MapMaker Tool 2.0 : http://hydlaaplaza.com/smf/index.php?topic=33954.0 - Make your own maps by walking around and useing the /pos Command!
Site: http://sites.google.com/site/tontowmerlin/

Lanarel

  • Testers
  • Hydlaa Notable
  • *
  • Posts: 782
    • View Profile
Re: A solution to speed-up PlaneShift on slow computers
« Reply #14 on: December 08, 2007, 11:32:10 pm »
If labels take so much resources, then what about chat bubbles? Aren;t those similar 2D effects? Just wondering if these 2D things are the reason the game freezes the moment Harn's place gets into view :)