Skip to content

/usr/bin/s25edit has poor performance on linux #22

Open

Description

@stefson

on linux, the s25edit binary eats a whole core on my amd64 machine while in the menu, and continues to do so while editing maps. It still gives decent frames per seconds on a fast machine, but it's only 1-2 fps on the rpi2 :/

I tried to strace the s25edit binary, and it seems there's a ton of lseek () going on:
strace-log.zip

Activity

  1. Flamefire commented on Jan 3, 2020

    @Flamefire
    Member

    I optimized the software renderer that is used here to the maximum I could do. We'd need to use the OpenGL renderer used in RttR main to get more performance but that's gonna take a while :/

    So closing for now

  2. stefson commented on Jan 4, 2020

    @stefson
    ContributorAuthor

    I doubt this is going to be fixed anytime soon too, but if you confirm the bug once it should not be closed unless fixed properly. Even if that will take a really long time.

  3. reopened this on Jan 4, 2020
  4. Flamefire commented on Jan 5, 2020

    @Flamefire
    Member

    Sorry I was in a hurry:

    s25edit binary eats a whole core on my amd64 machine while in the menu, and continues to do so while editing maps.

    This was due to a missing frame rate limiter coupled with the limited performance of the software renderer. The former was added in 944cd87 and performance of the renderer was improved by several commits by about 15%. I doubt more is possible without a major rewrite which won't happen as a hardware renderer is more suitable. And getting a hardware render could be done by using the one from RttR main but that won't happen either. a) due to time constraints: it simply isn't important enough and b) the SW renderer has other benefits like using the algo from Xaser which can serve as an alternate implementation and check if it looks different/better than ours, which works completely different.

    but it's only 1-2 fps on the rpi2

    RPI is not a target platform for me (us?) and especially the editor is more an additional program which made sense to be integrated. Spending time optimizing for that case doesn't seem worth it, there is much more and more valuable things to do. Again: This would basically be a rewrite of the editor.

    -->

    • 100% CPU consumption bug fixed
    • performance improved
    • rest: not a bug, won't do

    Hence me closing this.

  5. morganchristiansson commented on Jun 19, 2026

    @morganchristiansson
    Contributor

    I've implemented OpenGL (on Linux) using AI. It's somewhat large change even though I narrowed scope to terain editor only. s2client has all UI drawing in OpenGL.
    morganchristiansson/s25edit@resize-window...opengl-small
    Waiting for #37 to merge before submitting PR. Will be big to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions