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

Diffing_Engine: Do not include static properties and fields in differences #3410

Conversation

IsakNaslundBh
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh commented Sep 4, 2024

Issues addressed by this PR

Closes #3406

Rule out static properties from inclusion in comparison. (see issue for a bit more detail).
Minor cleanup of unused using's.

This reinstates the behaviour for testing prior to this:
BHoM/Test_Toolkit#474

Test files

Check unit-tests. This should give a not insignificant improvement in speed for running through them, especially for tests containing System.Drawing.Color.

Also, @alelom , great if you can test this through your diffing tests.

Changelog

Additional comments

Example run before this PR:

https://github.com/BHoM/BHoM_Engine/runs/29579805351

a bit of half unrelated clean-up. Found these while searching for places where kellerman was being used, to ensure the config change was not required elsewhere, and thought I might as well remove the unused using's while I found them. Not the only file that has a reference to kellerman is ObjectDifferences.cs.
@IsakNaslundBh IsakNaslundBh added type:bug Error or unexpected behaviour type:feature New capability or enhancement labels Sep 4, 2024
@IsakNaslundBh IsakNaslundBh self-assigned this Sep 4, 2024
@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check unit-tests

Copy link

bhombot-ci bot commented Sep 4, 2024

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

  • check unit-tests

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check serialisation

Copy link

bhombot-ci bot commented Sep 5, 2024

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

  • check serialisation

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.

This works well. When profiling with >1000 elements having static properties (e.g. with 1000 Planes), this gives an improvement of about 50% less time.

Before and after comparison (from the DiffingTests_Prototypes):
image

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check required
@BHoMBot check compliance

Copy link

bhombot-ci bot commented Sep 25, 2024

@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
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

Copy link

bhombot-ci bot commented Sep 25, 2024

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

Copy link

bhombot-ci bot commented Sep 25, 2024

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.

Copy link

bhombot-ci bot commented Sep 25, 2024

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.

@IsakNaslundBh
Copy link
Contributor Author

@BHoMBot check ready-to-merge

Copy link

bhombot-ci bot commented Sep 25, 2024

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

  • check ready-to-merge

@IsakNaslundBh IsakNaslundBh merged commit 0471f52 into develop Sep 25, 2024
13 checks passed
@IsakNaslundBh IsakNaslundBh deleted the BHoM_Engine-#3406-DoNotIncludeStaticProeprtiesAndFieldsInDiffrences branch September 25, 2024 06:55
@BHoMBot BHoMBot mentioned this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing skipping static properties for ObejctDifferences for when checking results of unit tests
2 participants