Show More
@@ -952,6 +952,9 class ui(object): | |||
|
952 | 952 | def _writenobuf(self, write, *args, **opts): |
|
953 | 953 | self._progclear() |
|
954 | 954 | msg = b''.join(args) |
|
955 | ||
|
956 | # opencode timeblockedsection because this is a critical path | |
|
957 | starttime = util.timer() | |
|
955 | 958 | try: |
|
956 | 959 | if self._colormode == 'win32': |
|
957 | 960 | # windows color printing is its own can of crab, defer to |
@@ -963,18 +966,14 class ui(object): | |||
|
963 | 966 | msg = self.label(msg, label) |
|
964 | 967 | write(msg) |
|
965 | 968 | finally: |
|
966 | pass | |
|
969 | self._blockedtimes['stdio_blocked'] += \ | |
|
970 | (util.timer() - starttime) * 1000 | |
|
967 | 971 | |
|
968 | 972 | def _write(self, data): |
|
969 | # opencode timeblockedsection because this is a critical path | |
|
970 | starttime = util.timer() | |
|
971 | 973 | try: |
|
972 | 974 | self.fout.write(data) |
|
973 | 975 | except IOError as err: |
|
974 | 976 | raise error.StdioError(err) |
|
975 | finally: | |
|
976 | self._blockedtimes['stdio_blocked'] += \ | |
|
977 | (util.timer() - starttime) * 1000 | |
|
978 | 977 | |
|
979 | 978 | def write_err(self, *args, **opts): |
|
980 | 979 | if self._bufferstates and self._bufferstates[-1][0]: |
@@ -984,7 +983,7 class ui(object): | |||
|
984 | 983 | |
|
985 | 984 | def _write_err(self, data): |
|
986 | 985 | try: |
|
987 | with self.timeblockedsection('stdio'): | |
|
986 | if True: | |
|
988 | 987 | if not getattr(self.fout, 'closed', False): |
|
989 | 988 | self.fout.flush() |
|
990 | 989 | self.ferr.write(data) |
General Comments 0
You need to be logged in to leave comments.
Login now