Menu

#2213 Default font hogging FPS

2020.2
WontFix
nobody
Low
2024-11-07
2020-04-17
No

The "pixelated" font used in the default Anthrax theme drops the FPS a lot, unlike "vector" font from Tortola theme. This only seems to affect Intel cards.

How to reproduce. Measure:

  1. Without any GUI open and menubar hidden.
  2. With a large dialog, such as Rendering Options, or a lot of smaller dialogs.
  3. Same as "2", after running "Debug/Cycle GUI Style".

In my case the numbers were 65, 17, 58.

Discussion

  • Anonymous

    Anonymous - 2020-04-17

    Forgot to say, the issue is old and has existed for as long as I remember.

     
  • James Turner

    James Turner - 2020-04-17

    Thanks for the report. I guess it's some bad interaction of the special textures used for fonts, and the Intel drivers. Can you list the Intel chipset & drivers you're using?

     
  • Anonymous

    Anonymous - 2020-04-17

    lspci -v:

    VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) (prog-if 00 [VGA controller])
            Subsystem: Lenovo 2nd Generation Core Processor Family Integrated Graphics Controller
    

    Driver:
    xf86-video-intel 1:2.99.917+899+gf66d3954-1

     
  • Anonymous

    Anonymous - 2020-04-17

    Has been the case on FreeBSD Intel driver as well, some other 2 versions.

     
  • James Turner

    James Turner - 2020-04-17

    @soitanen one thing that would help: can you replace the fonts listed in styles/anthrax.xml one by one, to work out which file is the problem? I see several fonts used:
    HELVETICA_12, HELVETICA_14, FIXED_8x13 and SANS_12B

    None of these are used in the tortola theme, so I guess any of them could be the cause (hopefully not all of them .. )

     
    • Michael Soitanen

      I'm not sure, that I should be mentioned here :)

       
      • James Turner

        James Turner - 2020-04-17

        Oh sorry, wrong Michael! My mistake.

         
  • James Turner

    James Turner - 2020-04-17
    • status: New --> NeedInfo
    • Milestone: None --> 2018.3.0
     
  • Anonymous

    Anonymous - 2020-06-13

    The offending fonts are most of the fonts used in the Anthrax theme:

    HELVETICA_*
    FIXED_*
    SANS_*
    TIMES_*
    

    that is, basically all pixel fonts I know of.

    On-screen stats for both themes:
    https://imgur.com/a/zrf9Ngp
    Please ignore the broken rendering, I just updated my OS, and the antialiased font breaks GUI rendering now (thank you, driver devs, thank you so much for that... -_- ).

     
  • James Turner

    James Turner - 2020-06-15
    • Milestone: 2018.3.0 --> 2020.2
     
  • Anonymous

    Anonymous - 2020-07-01

    Update about the broken rendering of GUI with antialiased fonts.

    I have just tried with older -next that sure used to render correctly, and the issue is still there, so this is indeed something OS-side.

    What dependencies of are responsible for the rendering of antliased fonts, developers of what should I bug about breaking FG's GUI?

     
  • Anonymous

    Anonymous - 2020-07-01

    Another observation: removing <option name="mesa_glthread" value="true"/> from ~/.drirc seems to fix the rendering of GUI with antialiased font.

     
  • James Turner

    James Turner - 2020-07-02

    I will need to some reaearch into how they're loaded, it will be some special texture options I guess. But, in the screenshot you psoted, what exactly is broken? I don't see something really bad? (At least, I can read the text...)

     
  • Anonymous

    Anonymous - 2020-07-02

    Parts of GUI randomly disappear if antialiased font is used and mesa_glthread is on:
    https://gitlab.freedesktop.org/mesa/mesa/-/issues/3213

     
  • James Turner

    James Turner - 2020-07-02

    Added some comments there to help the driver guys.

     
  • Anonymous

    Anonymous - 2020-07-02

    Thanks, I'm sorry about jumbling 2 or 3 separate issue together, though. I just don't know which one belongs where anymore.

     

    Last edit: Anonymous 2020-07-02
  • Anonymous

    Anonymous - 2020-07-13

    Btw, since the pixel fonts are in C++, as opposed to files, could it be that the slowdown is due to them being generated every frame somehow?

     
  • James Turner

    James Turner - 2020-07-13

    No, the fonts are created just once, as far as I can tell.

     
  • xDraconian

    xDraconian - 2020-08-06
    • labels: --> GUI, Performance
     
  • Anonymous

    Anonymous - 2021-01-11

    By the way, why, despite this perf issue and menubar corruption on some AMD drivers, is Anthrax still the default? Tortola has none of these issues and also it looks prettier.

     
  • Megaf

    Megaf - 2021-01-11

    @jmturner I believe it would be interesting for the community and current users to swap the bitmap fonts to the same font, non bitmap in anthrax.xml if that's the only issue. As I wrote in https://sourceforge.net/p/flightgear/codetickets/2513/#a767/a6e3

    Also, @jmturner in the name of the community I want to say thanks for your quick response in the freshly opened tickets, I do really appreciate that!

     

    Last edit: Megaf 2021-01-11
  • Gijs

    Gijs - 2024-11-07
    • status: NeedInfo --> WontFix
     
  • Gijs

    Gijs - 2024-11-07

    Since we're dropping PUI and replacing it by Canvas-based menus/dialogs, this issue is most likely no longer valid.

     

Log in to post a comment.

MongoDB Logo MongoDB