Title: [FEATURE/DISCUSSION]: Allow fine tuning of persistence setup · Issue #2524 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [FEATURE/DISCUSSION]: Allow fine tuning of persistence setup · Issue #2524 · python-telegram-bot/python-telegram-bot
X Title: [FEATURE/DISCUSSION]: Allow fine tuning of persistence setup · Issue #2524 · python-telegram-bot/python-telegram-bot
Description: There are two places in the current persistence setup where I think we can offer more customization for advanced users. All of this are just first ideas and up for discussion. If the dev team doesn't like the (use case value)/(maintenanc...
Open Graph Description: There are two places in the current persistence setup where I think we can offer more customization for advanced users. All of this are just first ideas and up for discussion. If the dev team doesn...
X Description: There are two places in the current persistence setup where I think we can offer more customization for advanced users. All of this are just first ideas and up for discussion. If the dev team doesn...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2524
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE/DISCUSSION]: Allow fine tuning of persistence setup","articleBody":"There are two places in the current persistence setup where I think we can offer more customization for advanced users. All of this are just first ideas and up for discussion. If the dev team doesn't like the (use case value)/(maintenance workload) ratio, I'd be fine with not doing this.\r\n\r\n1. Edit: We're dropping `insert/replace_data` see #2882 . \r\n\r\n Original comment: \r\nWe currently pass all data that goes through the persistence setup through `replace/insert_bot`. While this is the safest way to make sure no `Bot` instance gets serialized, it can also introduce some overhead which could get noticable when you have large, nested data structures in your `chat/bot/user_data` or are handling many updates. Adanced users will know where in their data they have bot instances that should get replaced. So we could offer settings like `replace_bots_in_chat/bot/user_data` (defaulting to True) and only call `replace/insert_data` when necessary.\r\n\r\n One should note that we'd have to re-indroduce deepcopy into the built-in persistence classes (depending on the `replace_bots_in_*` settings, that is). See https://github.com/python-telegram-bot/python-telegram-bot/pull/2262#discussion_r632762276\r\n\r\n2. #2285 already made an effort to reduce the calls of `Dispatcher.update_persistence`. Still, updating after every update (or even handler call in case you're using `run_async`) might be unecessary, especially when you're getting updates frequently. Similarly to `PicklePersistence.on_flush` which allows users to control how often `PP` writes to file, we would add a flag telling `Dispatcher` to never automatically call `Dispatcher.update_persistence` at runtime (only on shutdown). Then users can call `Dispatcher.update_persistence` manually to their liking.","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2021-05-15T16:39:47Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2524"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:118dcf0c-f1a3-ef00-c9e9-3407620e5828 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C41E:1FE434:2555560:30F9895:6B025941 |
| html-safe-nonce | 1dce2a7d3257e9897f5b77952c1e8e58e6ba2c4ab3676c0727c250873da4314f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDFFOjFGRTQzNDoyNTU1NTYwOjMwRjk4OTU6NkIwMjU5NDEiLCJ2aXNpdG9yX2lkIjoiNjYzMjY2MDQxODY3NjU0NTg1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 16c23d3aac8abe10ebfff9ae08a0511c664897ba2a344b42f9b7b17c27b6ad1c |
| hovercard-subject-tag | issue:892489647 |
| 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/python-telegram-bot/python-telegram-bot/2524/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02f95f759fe0e04682228fc1c0cd09207f94e173100a1af994778c1c91854177/python-telegram-bot/python-telegram-bot/issues/2524 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02f95f759fe0e04682228fc1c0cd09207f94e173100a1af994778c1c91854177/python-telegram-bot/python-telegram-bot/issues/2524 |
| og:image:alt | There are two places in the current persistence setup where I think we can offer more customization for advanced users. All of this are just first ideas and up for discussion. If the dev team doesn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Bibo-Joshi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width