This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Jon Madison
Posted Aug 18 - Read on Facebook

Has anyone attempted any caching of Framer layers? i thought i'd try localStorage, and that failed quickly, as i exceeded the quota.

Then, I tried the node-cache package (without knowing much about what it does under the hood) -- while caching i'm running into an error "Color.r is readonly".

I'm dynamically building layers based on data, and fear that i've pushed the performance limits. The more of these page layers i create, the slower the prototype responds, in particular the scroll component lags.

now that i'm talking it out, it could be because each of these layers are "stacked" and are all trying to respond to scroll events, but i'll look into that. in the meantime, the initial prototype load is still quite long (over a minute), and is affecting being able to even work on the prototype, so i'd love to cache for subsequent (re)loads.


George Kedenburg III

caching between reloads isnt really possible because a reload starts from nothing, so there wouldnt be a cache left to reload from (even if that did work). my recommendation would be to: set visible to false and ignoreEvents to true on layers youre not using, and turn them on before you're about to use them.

Matthew Mang

You can always destroy unused layers and dynamically re-build them. One thing I have noticed is that design view converts all images to huge PNGs, so for big prototypes, I would recommend going purely code based.

Jordan Robert Dobson

Marc Krenn worked on something similar.

Jon Madison

ew. yeah images from the design tab. word to Matthew Mang. why tho? not only huge PNGs, huge PNGs that are eventually not cached between loads apparently. The sad thing is, i'm not even *using* (most of) these images in my prototype. They are placeholders. In the other case, some of these images that are taking upwards of 18 seconds, are 20px x 20px images :-o

Jon Madison

Hosted, the prototype is loading within a reasonable timeframe via Chrome (~10s), but within the Framer IDE and Safari mobile, it's just under a minute.

Read the entire post on Facebook