Where does a value get its "persistent" value from? How to update this?

I have a bunch of labels on a page which are bound to tags. When the view loads there's about a second of blank values while they get their values from their tags. This is quite jarring as the layout bounces.

I understand I can set these label values to "Persistent" - the issue with this is if the tag value has changed it will load a previous value and then the tag value. Which is also not desirable.

Is there some way to update this value into memory so that when the view loads it brings in the most recent tag value rather than the old persistent value?

That's the whole point of non-persistent. Show nothing until the binding value arrives. Persistent shows the last saved designer value until the binding value arrives.

There's no faster "memory" to work with--Perspective is already running inside the gateway where the true values live. You're just seeing the time between transferring the view config to the browser and then the browser asking for and getting the binding values. There's a fundamentally non-zero time where the browser renders the view before it can apply bindings. (Made worse by network latency, if any to speak of.)

{ Vision is different, because Vision is different. }

3 Likes

Thanks for the reply @pturmel. I guess I'm just trying to get my head around "when" that value becomes the value it chooses to persist? Is it just whenever the designer was last saved? Is there some sort of way to force an update to that value?

It would also be good if we could store some of this stuff on the front-end through the use of local storage or similar? It seems like there's a lot of stuff that's constantly being re-rendered unnecessarily.

Yes.

Write directly to the project's JSON files in the gateway filesystem. (Ugly.)

Mwah-ha-ha-ha-ha! Get in line!

2 Likes

Not to mention that persistent value is used for all clients, so last client would win and the others would have a wrong last value. Client-side is really the only way for this to happen

Is using custom JS injected to read/write local storage anywhere within possibility? It would probably clash with the whole binding mechanism somehow.