Python Forum
Performance options for sys.stdout.writelines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance options for sys.stdout.writelines
#8
(Aug-22-2022, 04:52 PM)dgrunwal Wrote: I wanted to see if there was a simple way to expedite processing the sys.stdout.writelines portion
If you send 20MB to sys.stdout, the time that it takes depends on what sys.stdout actually is. If you are writing to a terminal, it will take a lot of time. On the other hand if sys.stdout is a file in RAM, it will take very little time. There are many other options such as a pipe a socket or whatever. I'm not sure the performance issue is on the Python side.
Reply


Messages In This Thread
RE: Performance options for sys.stdout.writelines - by Gribouillis - Aug-22-2022, 05:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  argparser not showing all options bigal 1 317 May-22-2024, 02:54 AM
Last Post: deanhystad
  [subprocess] Why stdout sent to stderr? Winfried 3 641 Jan-26-2024, 07:26 PM
Last Post: snippsat
  writelines only writes one line to file gr3yali3n 2 2,595 Dec-05-2021, 10:02 PM
Last Post: gr3yali3n
  changing stdout and stderr Skaperen 4 2,870 Dec-02-2020, 08:58 PM
Last Post: Skaperen
  print a line break in writelines() method leodavinci1990 1 6,694 Oct-12-2020, 06:36 AM
Last Post: DeaD_EyE
  Get stdout of a running process yok0 0 3,206 Aug-20-2020, 10:12 AM
Last Post: yok0
  will with sys.stdout as f: close sys.stdout? Skaperen 9 4,917 Nov-03-2019, 07:57 AM
Last Post: Gribouillis
  performance kerzol81 1 2,002 Oct-07-2019, 10:19 AM
Last Post: buran
  Help with options raiden 1 2,038 Aug-30-2019, 12:57 AM
Last Post: scidam
  Distilling strings using .writelines() and .read() tedie 1 2,131 Jun-24-2019, 09:56 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020