bevyengine / bevyengine/bevy

derive(Event) option to use single buffering

Open
#10,759 2 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Performance
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

For some types of events, like an `UpdatePosition` event, data that is one frame/tick behind might be useless. Having the option to disable double buffering and use single buffering per event type could be a nice performance improvement.

## What solution would you like?

```rust
#[derive(Event)]
#[event(buffer = "single")]
struct PositionEvent {
x: i32,
y: i32,
z: i32,
}
```

## What alternative(s) have you considered?

Continue to use double buffering.

Contributor guide

Open the contributing guide

Research direction

Start from the proposed #[derive(Event)] and #[event(buffer = "single")] entry points, then inspect the existing event buffering implementation and related tests. Done means event types can opt into single buffering while existing double-buffered behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.