-
Notifications
You must be signed in to change notification settings - Fork 13
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
Huge Performance Issues #7
Comments
After initial research this seems a problem related to the |
@felipecespedes I've tested with Here's a new demo: https://i.imgur.com/OBzBCNi.mp4 Keep in mind that there is still a slight delay between click (grey circle appearing) and re-render completion (actual purple circle appearing). The delay is most noticeable when changing clothing, since I render the clothing multiple times to give the user the possibility to preview colors, see this demo: https://i.imgur.com/yE3K8Nb.mp4 Also, I've only tested this on an iPhone 11, iPhone 8 and my simulator on my i9 MacBook Pro, so the performance issues must be huge on low-end android devices or even older iPhones. |
@felipecespedes After a bit of investigating, I don't think it's actually expensive to draw. I've measured a few parts of the JS code, and it looks like building the JSX tree is incredibly slow, especially in my use case where I'm drawing each part as an individual component (to make a selectable list), and then the full Avatar again. Not exactly sure if it's the React.Context API's fault (used by
|
@mrousavy Can you share how you imported the individual parts for drawing? I mean, how did you only draw the shirt, the mask, the glasses, ...? I'd be interested in that. |
Is there any news on the above? (hopefully I am not too late to the party) |
@pierroo I am using this lib in production and I do not recognize any performance issues tbh |
Hi! While I really like the drawing style of the characters and want to use them to identificate users instead of profile pictures, I cannot do so. Unfortunately the render-time of a single bighead is so high, that I simply cannot use it in production (yet). I also created a screen where the user can customize his BigHead, which renders even slower.
I'm talking about noticeable delay in initial rendering (mounting) (see this demo), and generally really slow renders on re-rendering when a prop changes (see this demo). Those are definitely UI thread lags, so the vectors must be composed using expensive techniques, such as clipping, which could be optimized.
I am trying to debug why this renders so slow, as normally vector rendering should be really fast. Now to my actual question(s):
The text was updated successfully, but these errors were encountered: