Commits on Source (7)
-
Jakub Ziebinski authored
-
Mateusz Żebrak authored
-
Mateusz Żebrak authored
Looks like it is some leftover when we stored single aiohttp session in a classvar which could lead, and looks like it lead to some race condition.
-
Mateusz Żebrak authored
Store single aiohttp.ClientSession - make benefit from keep-alive HTTP feature provided by some proxy servers like jussi Even though hived/beekeeper itself does not allow for the keep-alive feature, still when communicating with some mainnet nodes we can benefit from storing a single session. That's because proxy server might add the keep-alive HTTP feature itself. After hive!1363 we can finally implement this behaviour, because aiohttp will handle the disabled keep-alive by itself and previously it was unable to detect disabled keep-alive because of hived/beekeeper nodes not fulfill the RPC specification (in HTTP/1.1 its required to implicitly put `Connection: close` header when disabled) Now we don't have to handle special case for beekepere communication and for testnet hived communication versus mainnet (jussi) communication. All work is being done by aiohttp which correctly resuses session or disables the keep-alive feature. When communicating with api.hive.blog, during 1 min test (~40 calls) to UpdateNodeData, I got interesting results - during data harvesting: - avg in ~0.46s with this commit - while it was ~0.77s before.
-
Mateusz Żebrak authored
-
Mateusz Żebrak authored
-
Jakub Ziebinski authored
Showing
- clive/__private/core/beekeeper/handle.py 5 additions, 3 deletionsclive/__private/core/beekeeper/handle.py
- clive/__private/core/commands/commands.py 2 additions, 3 deletionsclive/__private/core/commands/commands.py
- clive/__private/core/communication.py 88 additions, 54 deletionsclive/__private/core/communication.py
- clive/__private/core/error_handlers/async_closed.py 0 additions, 20 deletionsclive/__private/core/error_handlers/async_closed.py
- clive/__private/core/node/node.py 18 additions, 3 deletionsclive/__private/core/node/node.py
- clive/__private/core/world.py 7 additions, 3 deletionsclive/__private/core/world.py
- clive/__private/ui/screens/cart/cart.py 30 additions, 23 deletionsclive/__private/ui/screens/cart/cart.py
- clive/__private/ui/screens/config/set_node_address/set_node_address.py 2 additions, 37 deletions...te/ui/screens/config/set_node_address/set_node_address.py
- clive/__private/ui/widgets/alarm_display.py 6 additions, 0 deletionsclive/__private/ui/widgets/alarm_display.py
- clive/__private/ui/widgets/buttons/clive_button.py 8 additions, 0 deletionsclive/__private/ui/widgets/buttons/clive_button.py