After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143914 - Performance improvement
Performance improvement
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: VTE Maintainers
Nalin Dahyabhai
Depends on:
Blocks: 137864
 
 
Reported: 2004-06-07 22:43 UTC by Soren Sandmann Pedersen
Modified: 2005-03-02 16:03 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch (15.01 KB, patch)
2004-06-07 22:45 UTC, Soren Sandmann Pedersen
none Details | Review
Performance improvements seen with the patch in Solaris (1.82 KB, text/plain)
2004-11-05 05:49 UTC, Narayana Pattipati
  Details
Performance improvements seen with the patch in Linux (1.55 KB, text/plain)
2004-11-05 05:51 UTC, Narayana Pattipati
  Details

Description Soren Sandmann Pedersen 2004-06-07 22:43:54 UTC
Here is a patch that does five things:

    - Makes VTE stop outputting spaces. Currently VTE pads each line with
      spaces. Those spaces propagate all the way through Xft to the
      X server. 

    - Improves the algorithm to find the next control character in the iso2022
      process. The new algorithm stops as soon as it sees a control character,
      and it does the processing in one pass instead of seven.

    - Uses a hashtable instead of a tree for the set of ambiguous characters.
 
    - Has an additional table of "unambiguous" ranges.

    - Modifes the input processing to only display after 10 ms, not 2 ms
      as it does currently. Also use separate coalescing and display
      timeouts.

The result is a good performance improvement. As an example, the benchmark

    seq -f "testtesttest %g" 100000

takes around 12 seconds with the patch and around 29 without. The numbers varies
from run to run though.

There is an inherent trade-off between performance and showing what is going on;
I think this patch strikes a reasonable balance.
Comment 1 Soren Sandmann Pedersen 2004-06-07 22:45:13 UTC
Created attachment 28446 [details] [review]
patch
Comment 2 Marcin Krzyzanowski 2004-06-10 20:20:14 UTC
it work :)
Comment 3 D.S. (Spider) Ljungmark 2004-08-08 21:48:06 UTC
+10
Cuts down X and Gnome-terminal traffic a LOT.  Very good.  Makes gnome-terminal
almost bearable to work with.

Comment 4 Ivan Noris 2004-08-09 09:18:07 UTC
Has anyone tried this on Solaris? I'm trying on Sol 9 with GNOME 2.6.2, and
haven't feeling of better performance :(((
Comment 5 Elijah Newren 2004-08-18 19:06:30 UTC
I'm just doing a little cross-referencing work on vte performance bugs since
someone posted a patch in 137864 that did part of what Soeren's patch does, and
it would have helped to avoid this duplication of work...  (In other words, the
comments below aren't strictly related to this patch):

Note that there are also performance patches in bug 122656 (that appear
unrelated to this one), as noted above there's one that was just added to bug
137864 that is a strict subset of Soeren's patch, and comments 29 and 30 of bug
137864 look very interesting (from the maintainer of rxvt-unicode; he compares
algorithms and methods used by many different terminal emulation programs and
widgets and states his experience).
Comment 6 Duraid Madina 2004-08-21 21:49:13 UTC
Soren, please see some comments on this patch near the end of bug 137864.
Comment 7 Kjartan Maraas 2004-10-18 10:18:35 UTC
And can we PUHLEASE get this reviewed and commited if it's good to go?
Comment 8 Fernando Herrera 2004-10-28 18:43:07 UTC
Notice that in order to compile it with VTE_DEBUG defined this:

if (terminal->priv->processing) {
shold be:

if (vte_terminal_is_processing (terminal)) {
Comment 9 Narayana Pattipati 2004-11-05 05:49:34 UTC
Created attachment 33462 [details]
Performance improvements seen with the patch in Solaris
Comment 10 Narayana Pattipati 2004-11-05 05:51:16 UTC
Created attachment 33463 [details]
Performance improvements seen with the patch in Linux
Comment 11 Narayana Pattipati 2004-11-05 05:52:22 UTC
I had tried this patch in Solaris and Linux and the performance improvements are
very good. 

Along with this patch, I would suggest one more change: The default vte input
buffer size now is 4K. So, changing it to 8K would give some more performance
improvements. Actually, in ZVT, input buffer size was already changed from 4K to
8K, to get some performance benifits. We can also follow it.

Refer to the above two text file attachments, which measure the performance
improvements  I got with the patch in Solaris and Linux. (I also mentioned
performance improvements after changing 4K buffer size to 8K).

Its a too good patch to be missed out. I have seen the patch and most of it
makes sense to me. I would like to commit the patch after 10 days, unless
someone has concerns.
Comment 12 Fernando Herrera 2004-11-05 08:07:11 UTC
I think you should post your statment to commit this to desktop-devel mailing
list before doing the commit (asuming you have asked the maintainer before and
didn't get an answer)
Comment 13 Duraid Madina 2004-12-05 05:40:12 UTC
Does anyone know what the status is currently? Is this going to be committed soon?
Comment 14 Elijah Newren 2004-12-07 18:00:40 UTC
Duraid: VTE is not maintained.  (See
http://bugzilla.gnome.org/reports/patch-diligence-report.cgi and note that the
one patch that does count as having been reviewed for vte was merely a case
where two people submitted the same patch and someone happened to notice and
marked them as duplicates)
Comment 15 Duraid Madina 2005-01-02 05:56:08 UTC
This patch seems solid and needs to get in, somehow. Elijah, is Arnaud Patard
now the VTE maintainer?
Comment 16 Elijah Newren 2005-01-02 06:36:20 UTC
I agree, but there's not a whole lot I can do about it; however, maybe I should
bug Sven to try to jump in and assist with vte maintainence since he sounded
interested.

Arnaud Patard wasn't a name I knew anything about so I did some searches in cvs,
bugzilla, and through Google.  It looks like he might be the maintainer of the
Debian package of vte, but that's the only connection I can find.
Comment 17 Duraid Madina 2005-01-02 06:57:46 UTC
Please do! (bug Sven) Oops, it does seem he's the Debian vte maintainer - he has
included some of the outstanding patches (so I'm happy) but he can't do much
else with them (frown)
Comment 18 Frederic Crozat 2005-02-17 18:41:03 UTC
Be careful with this patch, it seems to cause regression (see bug #163814)
Comment 19 Kjartan Maraas 2005-02-23 00:08:45 UTC
This patch has been used in Fedora Core 3 for a while now with no apparent rush
of bugreports. I'm thinking the improvement justifies applying it even if it
does cause some problems in other corner cases. Fixing performance for everyone
is more important IMO.
Comment 20 Soren Sandmann Pedersen 2005-02-24 04:25:16 UTC
Fwiw, I can't reproduce bug 163814; minicom works fine for me. Maybe Mandrake
applied some other patch that interferes with this one ...
Comment 21 Frederic Crozat 2005-02-24 08:19:14 UTC
Hmm, minicom crash is somehow erratic (I can't reproduce it).

We are using this patch as well as Benjamin patches from bug #137864.
Comment 22 Kjartan Maraas 2005-02-28 21:30:06 UTC
Used in Fedora too. Commiting.
Comment 23 Vincent Noel 2005-03-02 16:03:36 UTC
It looks like the patch was committed, closing. Please re-open if I'm wrong.