-
Notifications
You must be signed in to change notification settings - Fork 6
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
Performance problems with detailed art (too many small shapes?) #8
Comments
yes, unfortunately, C++ will beat racket no matter how much we optimize. Things to try:
|
I think exploring the pruning might be beneficial. Here's an example, which renders some circles - about 25 are visible, but 5001 get rendered:
I'm guessing the pruning code would go in the function Let me know what you think and I'll do some exploring... |
Yes, that would be the obvious place. I guess the sub-problems we need to solve to optimize the performance of your benchmark case are:
|
Hi Rodrigo, Once I've done that I'll start trying out some pruning strategies, perhaps with some alternative data structures as you suggest. I'll let you know how I get on... |
My bad, I misunderstood you! I thought you're referring to the The class intent of the class is simply to be a place where: 1) you can add new "paths", and 2) you can "render" those added paths into a device context (dc). My previous comments refer to ideas to implement in that class. As for the I'm not 100% clear how to optimize that function |
Ah I see how it works now, with the let-loop. I have a theory that at some point we can discard the functions returned by |
More progress here: https://github.com/ericclack/racket-stamps/tree/performance More to do... |
Testing seems to show no performance improvement! However it's been interesting for me to see how the code works... we'll see if further work leads anywhere... |
Looking further I can see that the pruning is not having the desired effect -- certainly we are drawing less, but the work to record the paths seems to still reach the See here the low number of shapes and the high render time, which actually is mostly in "recording paths" (from https://github.com/ericclack/racket-stamps/blob/performance/examples/cf-pink-blossom2.rkt)
So I need to look at my logic here: |
See option #18 |
This is probably a hard problem to crack, but here's a description anyway...
This snowflake pattern in the Context Free gallery renders quickly in the CF app:
https://contextfreeart.org/gallery2/index.html#design/3771
Here's the CF code:
And here's my translation in Stamps:
I guess that
maximum-render-cycles
needs to be increased to get the detail, but this results in long render times and out of memory errors.The text was updated successfully, but these errors were encountered: