automotive-design-compose
automotive-design-compose copied to clipboard
Live update stops working with frames containing large number of layers
When I paste a frame with 389 layers into document, live updates stops working. Frame contains only vectors so file size shouldn't be an issue.
Restarting the application doesn't seem to help. No errors in Logcat either. Design switcher status shows old version of document.
I got it to update once, but after that Live update stopped again.
Hi there. Sometimes this happens when something in the 389 layers has some kind of newer Figma property set that we don't yet support yet and fail to parse, causing deserialization of the Figma file to fail. Does the DesignSwitcher show any errors if you open it up? This is the little arrow at the top right that shows some live update info if you open it up like this:
If you don't see anything there, is it possible to share a Figma document with the layers that cause this problem? Alternatively you could try taking subsets of those 389 layers to narrow down which part causes the problem.
Hi. No errors in DesignSwitcher.
But this time I got some errors in logcat.
Seems like some components are not accessable. Can this be because they are from shared file ?
Unfortunately I am unable to share the document because of NDA.
Those errors mean that those nodes in your Figma documents are instances of components defined in other files. When DesignCompose comes across those types of nodes, it tries to download the full component from the other file, but sometimes fails for some reason (no access, original component has been deleted, etc). That's what look like has happened here. However, it usually does not cause an issue. The issue is logged to logcat, but it continues with the rest of the Figma document and renders what it can, so I don't think that is the issue here.
From what I see here, live update is still working. I don't know what is in all those layers you are copying, but without being able to see it I would suggest trying to break it down into smaller parts to see if it's a particular layer causing a problem. If you're able to reproduce this with a set of layers in a test doc not under NDA it would also be helpful and I can take a look.
I tried to figure out what could be causing this issue. And found out, that Live update works fine, but the fetch/parse takes too long (~4 min for component containing 3 icons).
*images are blurred because of NDA
The component its fetching has 3 visible icons and another 8 hidden. All of them have 5 different variants. All of these components also have to be fetched from different file.
When I inserted a whole screen containing 389 layers the fetch/parse took so long I though that the Live update was broken.
Thank you @FruitSnack1 ! Can you confirm which version of DesignCompose your app is using right now? We had an early release that left excessive logging enabled that caused significant fetch delays.
Hi, The version is v0.21.0
@FruitSnack1 I think this could also be caused by components referenced from the layers being in other documents. In that case, DesignCompose fetches the referenced documents and also processes those in order to extract the full components (in case they have variants, etc).
We're going to add some logging to surface things that could take a long time during fetch (#281), so hopefully in a future release you'll be able to repro and we can find out what to do to make a fix.
Just figured out a quick solution.
In Figma you can detach all instances (turn components into frames, shapes, ...).
Without all the components and variants from different files, live update works normal and updates in matter of seconds, event with frames containing hundreds of layers.
To "detach all instances":
- Select all elements you want to detach
- Press
Ctrl+/(Command+/on mac) - Run the "Detach all nested instances" command
PS: Command should be ran in different file to avoid fetching all the components.
Ok, excellent. Are you using Figma's Design Library feature? We're wondering if we should restrict recursive doc fetching only to situations where a Design Library is in use (which would also limit the number of docs that must be fetched).
Yes we do.