Skip to content
New issue

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

Large blend stack causes 10x slowdown in fine rasterization #155

Closed
AlexVestin opened this issue Feb 26, 2022 · 2 comments
Closed

Large blend stack causes 10x slowdown in fine rasterization #155

AlexVestin opened this issue Feb 26, 2022 · 2 comments

Comments

@AlexVestin
Copy link

Was trying to familiarize with the structure and code and noticed one of the timings seemed off on my machine.

Running cargo run --release --bin cli Ghostscript_Tiger.svg had the Render kernel time at around 3 ms, while all other kernels were in the range of 0.02 to 0.15ms. Setting the MAX_BLEND_STACK to 1 in kernel4.comp the render kernel time drops to around 0.3ms, (and 1ms for MAX_BLEND_STACK 16). I tested with some other svgs (paper-1 and hawaii), which had similar results.

I had noticed the "large array per thread causing slowdown" in my own project previously, but have no idea if it is a my system issue since I've only tested with my own hardware. I'd be happy to help if any machine specific debugging is needed / close this issue if this only applies to my setup. I'm using a GTX 1070 and had the slowdown on both windows and linux.

@AlexVestin
Copy link
Author

Ah #83 seems to cover this, should've commented there instead

@raphlinus
Copy link
Contributor

No worries either way. This is useful feedback, and I'll take it on board when reworking the memory layout for the blend stack. Right now I'm leaning toward re-instantiating Elias' solution of counting up the blend stack space needed in coarse rasterization, but to avoid the problems of #83 put the blend stack in a separate binding so it can't slow the (performance critical) loads from the per-tile command list.

I'll probably create a new issue with the proposed plan going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants