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

Add caching system for CRUD methods #337

Merged

Conversation

IsakNaslundBh
Copy link
Contributor

Issues addressed by this PR

Closes #336

Add caching system in the base adapter, reducing the times the same objects are read more than once from the model.

Can for some cases significantly speed up both push and pulls from the adapter, depending o the case being run.

For full effect, the concrete adapters need to be updated to make use of this new system.

Test files

Changelog

Additional comments

@IsakNaslundBh IsakNaslundBh added the type:feature New capability or enhancement label Jan 17, 2023
@IsakNaslundBh IsakNaslundBh requested a review from alelom January 17, 2023 11:51
@IsakNaslundBh IsakNaslundBh self-assigned this Jan 17, 2023
@alelom alelom changed the title Add caching system for crud methods Add caching system for CRUD methods Jan 18, 2023
IsakNaslundBh added a commit to BHoM/GSA_Toolkit that referenced this pull request Jan 19, 2023
Also includes a tweak to read of materials to aim to make it fit with new system.
ID for materials for GSA10 now includes material type, as that is required to differentiate between different material types
BHoM_Adapter/CRUD/Cache.cs Outdated Show resolved Hide resolved
BHoM_Adapter/CRUD/Cache.cs Outdated Show resolved Hide resolved
Co-authored-by: Alessio Lombardi <[email protected]>
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check compliance
@BHoMBot check core

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 20, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check core

Discussing with @alelom that this should be the default for most if not all cases, with opt out being the exception case where Toolkits have to set this parameter
@alelom alelom self-requested a review January 20, 2023 15:35
Copy link
Member

@alelom alelom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the functionality. Code now looks good to me. Tested on Robot/GSA toolkits via the related PRs and the create-read test script for structural adapters.

@alelom
Copy link
Member

alelom commented Jan 20, 2023

@BHoMBot check compliance
@BHoMBot check core

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 20, 2023

@alelom to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance
  • check core

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

The check code-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

The check documentation-compliance has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

The check core has already been run previously and recorded as a successful check. This check has not been run again at this time.

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

The check installer has already been run previously and recorded as a successful check. This check has not been run again at this time.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Jan 23, 2023

@IsakNaslundBh to confirm, the following actions are now queued:

  • check ready-to-merge

@IsakNaslundBh IsakNaslundBh merged commit 558475d into develop Jan 23, 2023
@IsakNaslundBh IsakNaslundBh deleted the BHoM_Adapter-#336-AddCachingSystemForCRUDMethods branch January 23, 2023 07:58
IsakNaslundBh added a commit to BHoM/GSA_Toolkit that referenced this pull request Jan 27, 2023
Also includes a tweak to read of materials to aim to make it fit with new system.
ID for materials for GSA10 now includes material type, as that is required to differentiate between different material types
@bhombot-ci bhombot-ci bot mentioned this pull request Mar 13, 2023
FraserGreenroyd pushed a commit to BHoM/GSA_Toolkit that referenced this pull request Mar 28, 2023
Also includes a tweak to read of materials to aim to make it fit with new system.
ID for materials for GSA10 now includes material type, as that is required to differentiate between different material types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BHoM_Adapter: Add caching system for CRUD methods
2 participants