René's URL Explorer Experiment


Title: ENH: Optional dependencies for accelerating JSON serialization · Issue #2944 · plotly/plotly.py · GitHub

Open Graph Title: ENH: Optional dependencies for accelerating JSON serialization · Issue #2944 · plotly/plotly.py

X Title: ENH: Optional dependencies for accelerating JSON serialization · Issue #2944 · plotly/plotly.py

Description: On top of #2943, I investigated a couple of interesting libraries we could potentially use as optional dependencies to further accelerate JSON serialization pybase64 I played with pybase64 a little, and it looks like an easy way to get a...

Open Graph Description: On top of #2943, I investigated a couple of interesting libraries we could potentially use as optional dependencies to further accelerate JSON serialization pybase64 I played with pybase64 a little...

X Description: On top of #2943, I investigated a couple of interesting libraries we could potentially use as optional dependencies to further accelerate JSON serialization pybase64 I played with pybase64 a little...

Opengraph URL: https://github.com/plotly/plotly.py/issues/2944

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ENH: Optional dependencies for accelerating JSON serialization ","articleBody":"On top of https://github.com/plotly/plotly.py/pull/2943, I investigated a couple of interesting libraries we could potentially use as optional dependencies to further accelerate JSON serialization\r\n\r\n## pybase64\r\nI played with [`pybase64`](https://pybase64.readthedocs.io/en/v0.2.0/) a little, and it looks like an easy way to get a decent speedup over the built-in python `base64` module for performing the numpy base64 encoding step being introduced in https://github.com/plotly/plotly.py/pull/2943.  This wouldn't require any refactoring or anything, and can drop the base64 encoding time (which is a substantial portion of the total json encoding time for figures that contain large numpy arrays) by something liek 20% to 40%.\r\n\r\n## orjson\r\n[`orjson`](https://github.com/ijl/orjson) is a really impressive alternative JSON encoder that, in playing with a little bit, I've seen it be 2x to 5x times faster than the built-in Python `json` encoder.\r\n\r\n`orjson` doesn't support custom JSON encoder classes (like `PlotlyJSONEncoder`), so supporting this as an optional dependency would require a total refactor of the current json encoding process.\r\n\r\nBasically, we would need to switch to an architecture where we would preprocess the figure dictionary recursively to perform any conversions we need, and then feed that dictionary through the JSON encoder.\r\n\r\nAnother nice thing about `orjson` is that it automatically converts `nan` and `infinity` values to JSON `null` values, so the JSON re-endcoding stuff we were working through in https://github.com/plotly/plotly.py/pull/2880 wouldn't be needed (cc @emmanuelle ).\r\n\r\n\r\n","author":{"url":"https://github.com/jonmmease","@type":"Person","name":"jonmmease"},"datePublished":"2020-11-29T18:34:24Z","url":"https://github.com/plotly/plotly.py/issues/2944"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f1586fd7-c3d3-b12c-bd98-0f005cefe87f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB476:ADA9D:18F7934:2014B42:6B0135CC
html-safe-nonce7f8fa633bb11deafd564497c23395e60e856e71916156a3be223a5026c938076
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDc2OkFEQTlEOjE4Rjc5MzQ6MjAxNEI0Mjo2QjAxMzVDQyIsInZpc2l0b3JfaWQiOiI4OTg4MDc0MTk2NjYzODc1MDIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3c08658eae11ba8f114d13a19fee25f150cf7207c906c42190641081edca29c4
hovercard-subject-tagissue:752977836
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.py/2944/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cc53cfdb0411201bcee9ceb9e8beabc7472c8bd956ed18b5fab5784b54498cc7/plotly/plotly.py/issues/2944
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cc53cfdb0411201bcee9ceb9e8beabc7472c8bd956ed18b5fab5784b54498cc7/plotly/plotly.py/issues/2944
og:image:altOn top of #2943, I investigated a couple of interesting libraries we could potentially use as optional dependencies to further accelerate JSON serialization pybase64 I played with pybase64 a little...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejonmmease
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/plotly/plotly.py git https://github.com/plotly/plotly.py.git
octolytics-dimension-user_id5997976
octolytics-dimension-user_loginplotly
octolytics-dimension-repository_id14579099
octolytics-dimension-repository_nwoplotly/plotly.py
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14579099
octolytics-dimension-repository_network_root_nwoplotly/plotly.py
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/plotly/plotly.py/issues/2944#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.py%2Fissues%2F2944
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fplotly%2Fplotly.py%2Fissues%2F2944
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=plotly%2Fplotly.py
Reloadhttps://github.com/plotly/plotly.py/issues/2944
Reloadhttps://github.com/plotly/plotly.py/issues/2944
Reloadhttps://github.com/plotly/plotly.py/issues/2944
plotlyhttps://github.com/plotly
plotly.pyhttps://github.com/plotly/plotly.py
Codehttps://github.com/plotly/plotly.py
Issues650 (650)https://github.com/plotly/plotly.py/issues
Pull requests83 (83)https://github.com/plotly/plotly.py/pulls
Actionshttps://github.com/plotly/plotly.py/actions
Security and qualityhttps://github.com/plotly/plotly.py/security
Insightshttps://github.com/plotly/plotly.py/insights
https://github.com/plotly/plotly.py
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.py/issues/2944
New issuehttps://github.com/login?return_to=https://github.com/plotly/plotly.py/issues/2944
ENH: Optional dependencies for accelerating JSON serialization https://github.com/plotly/plotly.py/issues/2944#top
https://github.com/jonmmease
jonmmeasehttps://github.com/jonmmease
on Nov 29, 2020https://github.com/plotly/plotly.py/issues/2944#issue-752977836
#2943https://github.com/plotly/plotly.py/pull/2943
pybase64https://pybase64.readthedocs.io/en/v0.2.0/
#2943https://github.com/plotly/plotly.py/pull/2943
orjsonhttps://github.com/ijl/orjson
#2880https://github.com/plotly/plotly.py/pull/2880
@emmanuellehttps://github.com/emmanuelle
https://github.com/sdementen
sdementenhttps://github.com/sdementen
on Nov 30, 2020https://github.com/plotly/plotly.py/issues/2944#issuecomment-735574965
https://python-rapidjson.readthedocs.io/en/latest/benchmarks.html#tableshttps://python-rapidjson.readthedocs.io/en/latest/benchmarks.html#tables
https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/basedatatypes.py#L3289https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/basedatatypes.py#L3289
#2880https://github.com/plotly/plotly.py/pull/2880
https://github.com/jonmmease
jonmmeasehttps://github.com/jonmmease
on Nov 30, 2020https://github.com/plotly/plotly.py/issues/2944#issuecomment-735711249
@sdementenhttps://github.com/sdementen
nicolaskruchtenhttps://github.com/nicolaskruchten
completedhttps://github.com/plotly/plotly.py/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 29, 2021https://github.com/plotly/plotly.py/issues/2944#event-4816258357
Sign up for freehttps://github.com/signup?return_to=https://github.com/plotly/plotly.py/issues/2944
Sign in to commenthttps://github.com/login?return_to=https://github.com/plotly/plotly.py/issues/2944
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.