Title: WebSocketClient raw handling should be improved · Issue #294 · massive-com/client-python · GitHub
Open Graph Title: WebSocketClient raw handling should be improved · Issue #294 · massive-com/client-python
X Title: WebSocketClient raw handling should be improved · Issue #294 · massive-com/client-python
Description: A client will use raw=True for performance purposes. WebSocketClient ignores this and parses messages using the inefficient json module purely for internal debugging purposes, while passing the unparsed message to the handler, which will...
Open Graph Description: A client will use raw=True for performance purposes. WebSocketClient ignores this and parses messages using the inefficient json module purely for internal debugging purposes, while passing the unp...
X Description: A client will use raw=True for performance purposes. WebSocketClient ignores this and parses messages using the inefficient json module purely for internal debugging purposes, while passing the unp...
Opengraph URL: https://github.com/massive-com/client-python/issues/294
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WebSocketClient raw handling should be improved","articleBody":"A client will use raw=True for performance purposes. WebSocketClient ignores this and parses messages using the inefficient json module purely for internal debugging purposes, while passing the unparsed message to the handler, which will need to be parsed again. This means that raw=True is actually slower. \r\n\r\nIt should be like this to avoid pointles parsing:\r\n\r\n```python\r\n if not self.raw:\r\n # we know cmsg is Data\r\n msgJson = self.json.loads(cmsg) # type: ignore\r\n for m in msgJson:\r\n if m[\"ev\"] == \"status\":\r\n logger.debug(\"status: %s\", m[\"message\"])\r\n continue\r\n cmsg = parse(msgJson, logger)\r\n```","author":{"url":"https://github.com/at-cf","@type":"Person","name":"at-cf"},"datePublished":"2022-09-03T17:34:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/294/client-python/issues/294"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:64a5284d-c3b2-dc1e-2778-51a4dd383ae4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CA8:418ED:36BCE5B:4B00559:6A4F19DA |
| html-safe-nonce | 5ad70eac04a4311389e359b28f42b03b060c9786f4cacc573ac44d58fd95b66f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0E4OjQxOEVEOjM2QkNFNUI6NEIwMDU1OTo2QTRGMTlEQSIsInZpc2l0b3JfaWQiOiI4NDk3NjExNTIyOTc2OTc5NDE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c8bffd51a16bb909a9767402f4d6140ab98854155b2845c439cab6af208654c6 |
| hovercard-subject-tag | issue:1360922426 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/massive-com/client-python/294/issue_layout |
| twitter:image | https://opengraph.githubassets.com/070bd95628e0c35d585fda6df11abfaf6cf0fdd291f9301dfce234d3052e05d3/massive-com/client-python/issues/294 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/070bd95628e0c35d585fda6df11abfaf6cf0fdd291f9301dfce234d3052e05d3/massive-com/client-python/issues/294 |
| og:image:alt | A client will use raw=True for performance purposes. WebSocketClient ignores this and parses messages using the inefficient json module purely for internal debugging purposes, while passing the unp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | at-cf |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/massive-com/client-python git https://github.com/massive-com/client-python.git |
| octolytics-dimension-user_id | 191946194 |
| octolytics-dimension-user_login | massive-com |
| octolytics-dimension-repository_id | 216660192 |
| octolytics-dimension-repository_nwo | massive-com/client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 216660192 |
| octolytics-dimension-repository_network_root_nwo | massive-com/client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width