-
Notifications
You must be signed in to change notification settings - Fork 189
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
feat: improve world contract performance #2287
Conversation
49e7824
to
b0fde5c
Compare
b0fde5c
to
ba9c27b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2287 +/- ##
=======================================
Coverage 69.60% 69.60%
=======================================
Files 352 352
Lines 46037 46031 -6
=======================================
- Hits 32043 32040 -3
+ Misses 13994 13991 -3 ☔ View full report in Codecov by Sentry. |
Caution Review failedThe pull request is closed. WalkthroughOhayo, sensei! The recent changes to the codebase primarily involve a simplification of array initialization syntax across multiple files, moving from the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant World
participant Contract
User->>World: Deploy Contract
World->>Contract: Initialize with Class Hash
Contract->>World: Confirm Deployment
World-->>User: Deployment Successful
sequenceDiagram
participant User
participant Storage
User->>Storage: Set Entity
Storage-->>User: Confirm Set
User->>Storage: Get Entity
Storage-->>User: Return Entity Data
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice @remybar let's keep iterating on that, const array was a good start + the branching. 👍
Description
Try some ideas to improve the performance of world contract functions to decrease the cost of the Dojo layer when manipulating model data.
Related issue
N/A
Tests
N/A
Added to documentation?
N/A
Checklist
scripts/prettier.sh
,scripts/rust_fmt.sh
,scripts/cairo_fmt.sh
)scripts/clippy.sh
,scripts/docs.sh
)Summary by CodeRabbit
New Features
CaseNotPacked
andComplexModel
.deploy_world
function for initializing a game world with new structures.Improvements
Configuration Updates
class_hash
andoriginal_class_hash
values in multiple configuration files, reflecting changes to underlying contracts and models.