Skip to content

Conversation

ojongerius
Copy link
Contributor

@ojongerius ojongerius commented Apr 6, 2022

…ions

This protects against functions that inadvertently change the incoming event data

Alternate fix for #1093

Description of changes:

Calculate hashes once, this protects against event data being changed, but uses less system resources (memory by preventing a copy.deepcopy() and cpu by not recomputing hashes.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…ions This protects against functions that inadvertently change the incoming event data
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 6, 2022
@heitorlessa
Copy link
Contributor

Thanks again @ojongerius - Closing in favour of #1090, where it's less performant but easier to maintain (we're also changing private to public methods here)

@heitorlessa heitorlessa closed this Apr 6, 2022
@ojongerius
Copy link
Contributor Author

All good, it was just a sketch. As this modules evolves switching to computing once could be taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests

2 participants