PistonDevelopers / PistonDevelopers/piston
Performance issue
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.7k
- Forks
- 235
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
Hi,
Lately I've been working (playing around) with this framework to get familiarized with it. In between my tests I found that it cannot handle rendering too many objects at once.
For example I was rendering 400 rectangles and it lagged.
I thought, something's gotta be wrong with my code (it was really messy by that time), so I decided to rewrite a minimal prototype by making a particle system and spawning lots of rectangles, and so it could handle 13k rectangles without lagging approx.
Then I tested loading textures, and I found out that I could still rendering ~13k rectangles + a bunch of textures without lagging ONLY IF, textures where placed after the rectangles in the object container; because if I first rendered the textures, spawning new rectangles lagged the whole scene.
Also, overall rendering was affected by font rendering.
I do not know if what I just described makes sense. I want to find out.
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported comparison: many rectangles, textures placed before or after rectangles, and font rendering. Use the minimal particle-system example described in the issue as the baseline, then identify whether the rendering slowdown still occurs and document a concrete cause or narrowed-down reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- 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