Skip to content
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

ROADMAP: $state immutable #7

Closed
tomByrer opened this issue Jun 17, 2021 · 2 comments
Closed

ROADMAP: $state immutable #7

tomByrer opened this issue Jun 17, 2021 · 2 comments

Comments

@tomByrer
Copy link
Contributor

reference
For some reason I thought there wasn't a global state, but saved in the DOM? Or is this the state cached in memory while said DOM is processed?

Is this state directly accessible by user code, or only via Quik?
Either way, I lean towards which ever is fastest. Could try non-immutable for v1, then visit the question again for v2; seems getting rid of immutable would be harder for programmers than adding later.


BTW, I thought of using flatstr to before saving/sending state in microservices. Performance gains from using flatstr:

ManySmallConcats: 28%
SeveralLargeConcats: 21% 
ExponentialSmallConcats: 46%
ExponentialLargeConcats: 33%

best place to use flatstr is just prior to passing it to an API that eventually runs non-v8 code (such as fs.WriteStream, or perhaps xhr or DOM apis in the browser).

@mhevery
Copy link
Contributor

mhevery commented Jun 18, 2021

Hi @tomByrer ,

Thanks for your question.

  1. The roadmap doc, is more of a mental dump for me than anything else. We are trying hard to make sure there is no state. $state is an instance variable that allows us to separate transient vs persistent state for entities.
  2. Currently you can think of the current API as the low-level API and we may choose to put something on top of it to make it more friendly, but it would not be to replace the low-level things only to augment it.

PS: If this answers your question, can we close this issue?

@tomByrer
Copy link
Contributor Author

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants