Jebbs / DSFML-C

The back end for DSFML
4 stars 3 forks source link

Inspect Text drawing performance issues #10

Open Jebbs opened 10 years ago

Jebbs commented 10 years ago

While working on my own project, I noticed a large performance hit while drawing text that I didn't notice when using the C++ version. Probably something I did. Should be fixed when I update to 2.1.

Jebbs commented 9 years ago

Found out that it wasn't anything I did. This happened because of how the binding was originally written, and whenever the sfFont's texture was updated, it would do a copy of the texture every time.

This is now fixed in my own version (will be pushing to the updates branch soonish before merging into master), and the time per draw call on a Text object went from around .4-.5 ms to around .007-.01ms. With my own test I did, which basically displayed some static text plus the framerate and went from an average 1.2ms per window loop to around .2ms per loop.