-
Notifications
You must be signed in to change notification settings - Fork 904
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
Avoid exponential call to rewrite dataset names when creating _FrozenDatasets
#953
Conversation
5599115
to
2594da1
Compare
_FrozenDataset
into a full dictionary on first read
Is this the right place to optimize? Should
|
@deepyaman I think the main motivation (and I'm guessing) was that That said, I think you are right in the sense that the approach proposed here is not the right one. I'm trying another one. |
I don't see this as an issue. From a user perspective, you should not be able to update |
Yep, going to push something along this line. Thank you |
when creating frozen datasets
2594da1
to
5dd5e00
Compare
_FrozenDataset
into a full dictionary on first read
@deepyaman I have pushed a fix which avoid any extra processing when creating Did some benchmark for call counts to the |
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.
LGTM
@@ -56,6 +56,7 @@ | |||
|
|||
CATALOG_KEY = "catalog" | |||
CREDENTIALS_KEY = "credentials" | |||
WORDS_REGEX_PATTERN = re.compile(r"\W+") |
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.
FYI this isn't really necessary AFAIK, as the compiled regex gets cached anyway, and you don't have a ton of regexes here (see https://docs.python.org/3/library/re.html#re.compile)
cc @datajoely just as an FYI
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.
Ah interesting - didn't know that, I still think this is nice for readability
_FrozenDatasets
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.
Brilliant!! Thank you so much for this. 🙏
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 one! 👏
…nDatasets` (kedro-org#953) Signed-off-by: Laurens Vijnck <[email protected]>
Description
Fixes #951
Development notes
Checklist
RELEASE.md
fileNotice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.