HaxeFlixel / HaxeFlixel/flixel

Performance of OpenFL vs. Flixel+OpenFL

Open
#2,978 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haxe
Stars
2.2k
Forks
522
Avg merge
34m
Merged PRs (30d)
1

Description

I ran both OpenFL's BunnyMark and Flixel's FlxBunnyMark on the same machine, adding bunnies until the fps dropped under 60. Windows-HXCPP-release. For FlxBunnymark, the options were: No Collisions/No shaders/Step: Variable/On-Screen. I also disabled the angularVelocity because the bunnies in the OpenFL version are not rotating.

FlxBunnyMark: 27k bunnies

OpenFL BunnyMark: 240k bunnies

27k bunnies for Flixel+OpenFL (at 52fps) vs. 240k bunnies for OpenFL (at 54fps).

Please forgive me if there is something obvious that I'm missing: both benchmarks are "official", I'm using the default configuration for each project, so I'm guessing they are doing the best they can to show the correct numbers. OpenFL's BunnyMark is using drawQuads, too.

Using the Visual Studio profiler there seems to be no discernible bottlenecks (as in: there are no obvious inefficiencies in Flixel that are eating the cpu time), just, the end result is that it's taking a lot more time to render.

Is Flixel unwittingly creating more work than it should for the rendering pipeline? Or is OpenFL missing some optimizations that overwhelmingly affect Flixel?

I know that there is more than raw performance to appreciate, but still: it's the same rendering engine, the numbers shouldn't be so different.

How can we approach the issue to gather more data, maybe find the root cause? Does anyone have any pointers?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run OpenFL's BunnyMark and Flixel's FlxBunnyMark with the stated Windows-HXCPP-release settings, including the collision, shader, step, and angularVelocity differences. Use the Visual Studio profiler to compare rendering work and determine the root cause of the performance gap; done means identifying a reproducible explanation and a concrete optimization target.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.