We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DrawImage
Now BenchmarkDrawImage takes too much memory like 4GB:
BenchmarkDrawImage
go test -bench=DrawImage -run=^$ -benchmem -memprofile mem.prof
The profiler says
Showing nodes accounting for 6360.44MB, 100% of 6361.44MB total Dropped 25 nodes (cum <= 31.81MB) Showing top 10 nodes out of 16 flat flat% sum% cum cum% 4705.71MB 73.97% 73.97% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*commandQueue).EnqueueDrawTrianglesCommand 1023.99MB 16.10% 90.07% 1023.99MB 16.10% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*uint32sBuffer).alloc (inline) 630.75MB 9.92% 100% 630.75MB 9.92% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*commandQueue).appendIndices (inline) 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2.(*Image).DrawImage 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/atlas.(*Image).DrawTriangles 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/atlas.(*Image).drawTriangles 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/buffered.(*Image).DrawTriangles 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*Image).DrawTriangles 0 0% 100% 1023.99MB 16.10% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*commandQueue).prependPreservedUniforms 0 0% 100% 6360.44MB 100% github.com/hajimehoshi/ebiten/v2/internal/graphicscommand.(*commandQueueManager).enqueueDrawTrianglesCommand
This can be an issue when we want to use BenchmarkDrawImage with -count=10.
-count=10
No response
The text was updated successfully, but these errors were encountered:
I thought this would work simply:
b.Cleanup(func() { img0.At(0, 0) img0.Deallocate() runtime.GC() })
However, -count=10 still accumulates memory usages and finally the test used 20GB memory... Hmm
Sorry, something went wrong.
No branches or pull requests
Operating System
What feature would you like to be added?
Now
BenchmarkDrawImage
takes too much memory like 4GB:go test -bench=DrawImage -run=^$ -benchmem -memprofile mem.prof
The profiler says
This can be an issue when we want to use
BenchmarkDrawImage
with-count=10
.Why is this needed?
No response
The text was updated successfully, but these errors were encountered: