Skip to content

Performance for real time applications #165

Closed

Description

@conicgames

Hello!

I'm using CSharpMath for my Android game (Exponential Idle) and I really love it. However, when I use it to display many elements that changes every frame (~100ms), then game can get quite laggy. To avoid this issue, I started using a workaround where I split my LaTeX elements into 2 parts, a static part that doesn't change every frame, and the dynamic part. For the dynamic part, whenever I can, I create a native label using custom font with Computer Modern font characters (a mix of Italic and Regular), to get the same appearance as your library. It works quite well, but I find this solution to be really messy.

My question: Is there any way I can improve re-rendering performance in this context so I can continue only using your library? Text elements that change every frame usually look like "x_1 = 1.234e50", where the right side is dynamic.

Thanks!

Activity

  1. Happypig375 commented on Sep 23, 2020

    @Happypig375
    Collaborator

    I think this can be improved by removing the unnecessary ToString -> reparse steps by the BindableProperties in MathView, mentioned at #141 (comment). However, this is necessary for Content and LaTeX bindable properties of MathView to sync up. This is hard to solve. Any ideas?

    (Btw, can you share how do you promote your game? I'd like CSharpMath to reach a larger audience too)

  2. charlesroddie commented on Nov 9, 2020

    @charlesroddie
    Collaborator

    Are you using CSharpMath.Forms or CSharpMath.SkiaSharp? Are you making sure to avoid the BindableProperties and generating TextPainters manually?

    CSharpMath/LayoutFarm.Typography should have some performance, but tweaks getting some simple dynamically changing tex at 60fps should be very easy.

    We get some performance issues on layout and resizing of larger documents but that operation is much more intensive.

  3. Repository owner locked and limited conversation to collaborators on Aug 30, 2026
  4. converted this issue into a discussion #267 on Aug 30, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions