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

Refactor Channel and ParadoxModules Logic to Use the Data Hive #63

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

Visual1mpact
Copy link
Owner

This pull request refactors the existing logic for managing channels and paradoxModules to utilize the newly created OptimizedDatabase class for key-value storage. The changes include:

  • Replacing previous logic for channel management and module handling with the OptimizedDatabase class.
  • Optimizing data access and manipulation by leveraging the new database's pointer-based system.
  • Updating relevant functions to store, retrieve, and delete channel and paradoxModule data more efficiently.

This refactor aims to enhance performance, reduce redundant world queries, and provide a more scalable solution for future database expansion.

- Introduced caching for pointer list in memory to reduce repeated world queries.
- Updated set() and delete() methods to use cached pointers and update the cache on modifications.
- Cached pointers are now loaded once and kept in memory for faster access.
- Improved performance by reducing the need for constant calls to world.getDynamicProperty() and JSON parsing.

This change enhances the efficiency of pointer-related operations, particularly in cases with frequent database updates.
@Visual1mpact Visual1mpact merged commit 1b8203f into rewrite Dec 9, 2024
1 check passed
@Visual1mpact Visual1mpact deleted the development branch December 9, 2024 00:10
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

Successfully merging this pull request may close these issues.

1 participant