Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance optimization: Find low-hanging fruit #3

Open
2 of 5 tasks
neobrain opened this issue Mar 7, 2024 · 1 comment
Open
2 of 5 tasks

Performance optimization: Find low-hanging fruit #3

neobrain opened this issue Mar 7, 2024 · 1 comment

Comments

@neobrain
Copy link
Member

neobrain commented Mar 7, 2024

All major components required for high-performance are in place (if not yet in the developer edition), but the emulator isn't quite reaching 60 FPS on anything but high-end devices yet. There must be low-hanging fruit somewhere that I've missed.

Some good candidates to look into are:

  • Graphics:
    • Streaming of vertex/texture/uniform data has poor efficiency. Persistent mapping of buffers and explicit flushing should perform better.
    • framebuffer management (implement more fast paths for blits; avoid unnecessary flushing to/reloading from memory)
      • MemoryFills currently invalidate textures/render targets (causing them to be reloaded from memory on next use). Instead, they should be translated to clears of the covered resources.
  • Kernel:
    • kernel scheduler (the task rotation is highly inefficient, which may add up to considerable overhead)
    • The thread timeout checks at the bottom of OS::ElapseTime is a major bottleneck that can be fixed fairly easily by storing all threads in WaitingForTimeout/Sleeping states in a list instead of traversing all threads.
      Fixed in 7d2c663.
  • Audio:
    • Implement null-audio (implemented in b094815)
@neobrain
Copy link
Member Author

The menu screen in Mario Kart 7 is abnormally slow, spending 30ms of host time each frame just in CPU emulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant