From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24834 invoked by alias); 7 Jan 2015 18:30:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24812 invoked by uid 89); 7 Jan 2015 18:30:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout22.012.net.il Received: from mtaout22.012.net.il (HELO mtaout22.012.net.il) (80.179.55.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jan 2015 18:30:29 +0000 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NHT00600KNN7X00@a-mtaout22.012.net.il> for gdb-patches@sourceware.org; Wed, 07 Jan 2015 20:30:26 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NHT006R5KQQ3M20@a-mtaout22.012.net.il>; Wed, 07 Jan 2015 20:30:26 +0200 (IST) Date: Wed, 07 Jan 2015 18:30:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH] Speed up "gdb -tui" output In-reply-to: To: Doug Evans Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83h9w278a9.fsf@gnu.org> References: <83zj9v7urq.fsf@gnu.org> <83sifn7mpt.fsf@gnu.org> X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00128.txt.bz2 > Date: Tue, 6 Jan 2015 12:54:02 -0800 > From: Doug Evans > Cc: gdb-patches > > >> Another possibility would be to do the string -> char -> string > >> processing differently. String printing utilities could accumulate > >> what they want to print and send the output in chunks instead > >> of characters. > >> Then tui_puts could get real strings instead of always getting > >> { char, '\0' }, and maybe that would be enough. > > > > This will hit the same problem: how to know when to stop accumulating > > and flush it out. > > What I'm saying is tui_puts would still call wrefresh unconditionally. > This is no different than your patch, conceptually, except that > it'd be up to higher layers to not send tui_puts a character at a time for the > common case of outputting strings. In the current implementation, tui_puts almost _always_ gets a single character. This is because all the *_unfiltered output functions eventually call null_write, which calls the to_fputs method one character at a time (and has some apology to defend that). > We send output a character at a time in part to support > lines_per_page, chars_per_line, and wrap_column, > relying on character-at-a-time buffering to save us. > Alas for windows that doesn't apparently doesn't work (yay windows). The problem is not Windows per se, it's the Windows console driver implemented as part of ncurses. > So one way to go, and again, this is just a possibility, > is to not send tui_puts a character at a time. This means a major redesign of how ui-file and friends work, much more than the energy and time I have to spend on this issue. > Is it possible to fix windows? > If the bug really is there ... It isn't.