Skip to content

perf(pinia-orm): Improve caching for hydrated models#889

Merged
CodeDredd merged 4 commits intonext-releasefrom
pinia-orm-853
Jan 24, 2023
Merged

perf(pinia-orm): Improve caching for hydrated models#889
CodeDredd merged 4 commits intonext-releasefrom
pinia-orm-853

Conversation

@CodeDredd
Copy link
Copy Markdown
Owner

@CodeDredd CodeDredd commented Jan 24, 2023

🔗 Linked issue

closes #853

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The hydration cache is almost now the same as the query cache. The hydration caching now doesn't use a deep compare anymore so that the speed will improve significatly for large model opjects. The perfomance should be 20%-80% better.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@CodeDredd CodeDredd added the enhancement New feature or request label Jan 24, 2023
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 24, 2023

Codecov Report

Base: 99.67% // Head: 99.66% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (8cd4908) compared to base (c41f89d).
Patch coverage: 96.87% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           next-release     #889      +/-   ##
================================================
- Coverage         99.67%   99.66%   -0.02%     
================================================
  Files                85       85              
  Lines              5611     5621      +10     
  Branches            503      504       +1     
================================================
+ Hits               5593     5602       +9     
  Misses               17       17              
- Partials              1        2       +1     
Impacted Files Coverage Δ
packages/pinia-orm/src/query/Query.ts 99.80% <96.55%> (+<0.01%) ⬆️
packages/pinia-orm/src/repository/Repository.ts 100.00% <100.00%> (ø)
packages/pinia-orm/src/support/Utils.ts 97.45% <0.00%> (-0.37%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@CodeDredd CodeDredd merged commit f59f24b into next-release Jan 24, 2023
@CodeDredd CodeDredd deleted the pinia-orm-853 branch January 24, 2023 10:41
@CodeDredd CodeDredd mentioned this pull request Jan 24, 2023
CodeDredd added a commit that referenced this pull request Jan 24, 2023
* fix(pinia-orm): `new` doesnt fire creating or created hook (#808)

* fix(pinia-orm): `new` doesnt fire creating or created hook
closes #801

* refactor(pinia-orm): fix type

* refactor(pinia-orm): linting

* chore: Update sponsors

* perf(pinia-orm): Querying models with belongsToMany relation are extremely slow (#876)

closes #823

* feat(pinia-orm): Support of composite key for some relations (#885)

- `belongsTo`
- `hasOne`
- `hasMany`

closes #829

* chore: Update nuxt2comp example

* chore(normalizr): Add unpkg & jsdelivr support

* perf(pinia-orm): Improve caching for hydrated models (#889)

* perf(pinia-orm): Improve caching for hydrated models

* refactor(pinia-orm): add missing operations

* refactor(pinia-orm): removed json comparison

* refactor(pinia-orm): remove cached objects if deleted

closes #853

* chore(normalizr): upgrade eslint config packages

* chore: Set ci to node version 18

* chore: ignore playground for eslint

* chore: update linting for ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants