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

[Fix] Remove double loading of data #802

Merged
merged 4 commits into from
Oct 10, 2024
Merged

[Fix] Remove double loading of data #802

merged 4 commits into from
Oct 10, 2024

Conversation

antonymilne
Copy link
Contributor

@antonymilne antonymilne commented Oct 10, 2024

Description

A special treat for @petar-qb to find when he's feeling better 😀 Probably the easiest optimisation we could have made. Thank you to him for spotting this horrible inefficiency that I had written in the code!

Functionally this is exactly the same as before. It's just better performing. Previously doing kwargs.setdefault always ran the .load() function. Now we only want to run it if it's strictly required (which in Vizro at the moment it actually never is, but I saw someone doing graph() the other day so they were using it, and maybe we will in future).

Notice

  • 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 authorized to submit this contribution on behalf of the original creator(s) or their licensees.
    • I certify that the use of this contribution as authorized by the Apache 2.0 license does not violate the intellectual property rights of anyone else.
    • I have not referenced individuals, products or companies in any commits, directly or indirectly.
    • I have not added data or restricted code in any commits, directly or indirectly.

@antonymilne antonymilne changed the title Remove double loading of data_frame [Fix] Remove double loading of data Oct 10, 2024
@antonymilne antonymilne marked this pull request as ready for review October 10, 2024 13:01
@antonymilne antonymilne requested a review from petar-qb October 10, 2024 13:01
Copy link
Contributor

@huong-li-nguyen huong-li-nguyen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@petar-qb petar-qb left a comment

Choose a reason for hiding this comment

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

What a warm welcome! Thanks for handling this A 🚀

@antonymilne antonymilne enabled auto-merge (squash) October 10, 2024 15:03
@antonymilne antonymilne merged commit d21f8cb into main Oct 10, 2024
34 checks passed
@antonymilne antonymilne deleted the fix/double-loading branch October 10, 2024 16:29
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.

3 participants