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
Keeping reactivity intact #659
Comments
That sound like something to have. |
Initially I was planning to just build this for Vuex-ORM 0.x since that is what we used. But looking at the code I didn’t know how to make it happen. And then looking at 1.x I was even more confused. Willingness to help is here. But know how is lacking for me as well |
@Juice10 I solved it. Took me some thinking but now the one performance bug will go away 😉 |
* perf(pinia-orm-659): Save hydrated models if not updated * refactor(pinia-orm): typo closes #659
Wow @CodeDredd this is incredibly cool! What a great job! |
Is there any way to get around the JSON comparison? Especially if you have large models the JSON stringification can be quite painful. |
@Juice10 puhhh i try to make this better....but i already searched ways comparing hydrated opjects. i needed that to be 100% sure that i don't return a saved hydratedobject for a query where you need an update. Yes i included an "update" but since pinia-orm also uses internally queries i was uncertain what happens at runtime. |
Thanks @CodeDredd you're a hero. I tried naively making the changes I suggested but that does break quite a lot |
yeah...god save the unit tests....thats the reason why i compare the hydrated objects. ^^ @Juice10 Maybe there is better way. If you find one that would be awesome. |
@Juice10 well i found for you the better way 😉 .... now you owe me a cup of ☕ 😜 |
Describe the feature
Keeping reactivity is incredible important to keep applications performant. However Pinia-ORM (& Vuex-ORM) generate a completely new javascript object for every single model in a collection everytime a mutation is triggered for something in that collection.
This has meant we’ve been forced to move away from Vuex-ORM for our app.
It’s great to see the progress on Pinia-ORM! Maybe this something Pinia-ORM could fix?
more info; vuex-orm/vuex-orm#746
Additional information
Final checks
The text was updated successfully, but these errors were encountered: