PistonDevelopers / PistonDevelopers/piston

Performance issue

Open
#1,159 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.