OpenSlides/server/openslides/utils/__init__.py
Finn Stutzenstein 8049bfa91e
Performance improvements for OS3+
- Cleans up log messages in the client
- Refactored the autoupdate bundle code into an own file
- Added bulk creates for History in Postgresql. This is the only database system
  that supports returning all ids whan multiple elements are inserted. We can
  make usage out of it.
- Added a `disable_history`, that is request-wide
- Disabled history on poll vote requests
- Removed unnecessary user ordering
- Reduced the queries for creating motion vote objects by one
- removed final_data: This was not prefetched. Using the normal data collection
  the data is prefetched
- removed unnecessary user query if vore delegation is not used
2021-01-21 12:53:51 +01:00

12 lines
392 B
Python

# overwrite the builtin print to always flush
def flushprint(*args, **kwargs): # type: ignore
if "flush" not in kwargs:
kwargs["flush"] = True
__builtins__["oldprint"](*args, **kwargs) # type: ignore
if "oldprint" not in __builtins__: # type: ignore
__builtins__["oldprint"] = __builtins__["print"] # type: ignore
__builtins__["print"] = flushprint # type: ignore