-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
Image rendering is slow #57
Comments
Are you using the simulator ? The simulator is very slow, but real device should do it in seconds at most. |
@ntnmrndn I use a real device. iPhone XS, 14.0.1. |
@muukii It appears that this function runs on the main thread sometimes, causing the UI to appear blocked. Additionally, the logs show that (for some reason) a CGImage is unavailable from the supplied UIImage. According to Apple's documentation, this can happen when converting between a UIImage and a CIImage... are you addressing this in v2? It seems that some of the issues also have to do with the TransitionPatch dependency? |
@Sam-Spencer Firstly, the above function can be run in background-thread.
Lager image takes a long time, it's unavoidable. In order to render large(full-size) image, we need to use CPU rendering in my opinion. |
And I thought we could get something optimizations. |
This PR might faster this. |
@muukii For large images
cgContext.draw(cgImage, in: CGRect(origin: .zero, size: canvasSize))
inpublic func render(resolution: Resolution = .full) -> UIImage
takes too long, about a minute.Can you please suggest how this can be fixed?
The text was updated successfully, but these errors were encountered: