rounded rectangle performance in P2D / P3D is extremely poor when stroke is used
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- computer-graphics, performance
Research direction
Start by running the supplied Java sketch in Processing 4.5.6 and compare the frame rate with stroke enabled versus disabled, in both P2D and P3D. Trace the rounded-rectangle rendering path used by these modes; done means the reproduction no longer shows the reported severe slowdown while preserving stroked rounded rectangles.
Written by the indexing model from the issue text.
Description
MacBook Air M3
Processing 4.5.6 (but also older versions apply)
This runs at around 8.5 fps.
void setup() {
size(800, 800, P2D);
frameRate(999);
}
void draw() {
background(0);
int cols = 16;
int rows = 16;
float margin = 50;
float gap = 10;
float rectW = (width - margin * 2 - gap * (cols - 1)) / cols;
float rectH = (height - margin * 2 - gap * (rows - 1)) / rows;
fill(255, 220, 0);
stroke(255);
strokeWeight(2);
for (int y = 0; y < rows; y++) {
for (int x = 0; x < cols; x++) {
float px = margin + x * (rectW + gap);
float py = margin + y * (rectH + gap);
rect(px, py, rectW, rectH, 10);
}
}
println(frameRate);
}
- Dominant language
- Java
- Stars
- 497
- Forks
- 183
- Avg merge
- 4h 39m
- Merged PRs (30d)
- 3
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.
More from processing/processing4
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
processing/processing4#1554 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
processing/processing4#1515 · 1 reaction ·
-
startup error Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
processing/processing4#1569 · 7 comments ·
-
Binaries under bin directory lack executable permissions for the snap and .deb packages for Linux Openbug
processing/processing4#1567 · 3 comments · 1 reaction · 1 assignee ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
processing/processing4#1565 ·
All issues in processing/processing4
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100