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

Convert base64 in BaseFigure.to_dict instead of validate_coerce #4784

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

marthacryan
Copy link
Collaborator

@marthacryan marthacryan commented Oct 7, 2024

Converting to base64 in BaseFigure.to_dict() offers the same performance improvements without changing the output of the data field of the Figure object. This will only be called through show() or in dash

Converting to base64 in validate_coerce_fig_to_dict offers the same performance
improvements without changing the output of the data field of the Figure
object.
for trace in fig_dict["data"]:
for key, value in trace.items():
if is_homogeneous_array(value):
print("to typed array: key:", key, "value:", value)
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a stray debugging statement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

@gvwilson gvwilson added feature something new P1 needed for current cycle labels Oct 8, 2024
@marthacryan marthacryan changed the title Convert base64 in validate_coerce_fig_to_dict instead of validate_coerce Convert base64 in BaseFigure.to_dict instead of validate_coerce Oct 10, 2024
@archmoj archmoj marked this pull request as ready for review October 15, 2024 20:28
@archmoj
Copy link
Contributor

archmoj commented Oct 15, 2024

Nice discovery! Thanks to @marthacryan and @emilykl
PR of the year! 🏆 🏅 🌟
This would simplify the changes made to the tests and validation steps on the #4470 PR.
💃

@archmoj archmoj merged commit de2bcb5 into pass-b64 Oct 15, 2024
3 of 5 checks passed
@archmoj archmoj deleted the b64-before-render branch October 15, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants