Subject: python, comint-mode: Large output makes Emacs freeze

From: [email-masked] (Fabián Ezequiel Gallina)
Date: Sat, 26 Jul 2014 23:22:41 -0300

Fixed in revno 117582 in trunk

Emacs is still slow, but at least responds to commands.  I feel that
everything that could be optimized on the comint side is pretty much
there and that the slowness being experienced is in fact related to the
long-lines slowness bug mentioned before[0].

Here's the current output for elp-results:

    comint-output-filter                                  206         3.5420630980  0.0171944810
    python-pdbtrack-comint-output-filter-function         207         2.5283979559  0.0122144828
    ansi-color-filter-apply                               618         1.5662161150  0.0025343302
    python-comint-postoutput-scroll-to-bottom             207         0.400739811   0.0019359411
    comint-postoutput-scroll-to-bottom                    1           0.365398304   0.365398304
    recenter                                              1           0.365378877   0.365378877
    python-shell-comint-end-of-output-p                   412         0.0554427629  0.0001345698
    python-shell-font-lock-comint-output-filter-function  207         0.032279105   0.0001559377
    ansi-color-process-output                             207         0.0107249640  5.181...e-05
    ansi-color-apply-on-region                            207         0.0098468030  4.756...e-05
    comint-carriage-motion                                206         0.0014299259  6.941...e-06
    python-shell-font-lock-post-command-hook              3           0.00034127    0.0001137566
    process-mark                                          828         0.000202256   2.442...e-07
    process-kill-buffer-query-function                    206         0.0001694799  8.227...e-07
    comint-send-input                                     1           0.000149412   0.000149412
    ansi-color--find-face                                 207         8.6848e-05    4.195...e-07
    process-status                                        208         7.752...e-05  3.727...e-07
    process-buffer                                        207         7.367...e-05  3.558...e-07
    ansi-color-apply-overlay-face                         207         6.695...e-05  3.234...e-07
    python-util-text-properties-replace-name              1           4.8394e-05    4.8394e-05
    comint-simple-send                                    1           3.8879e-05    3.8879e-05
    python-shell-font-lock-cleanup-buffer                 1           2.344e-05     2.344e-05
    comint-send-string                                    1           2.2201e-05    2.2201e-05
    process-send-string                                   1           1.5571e-05    1.5571e-05
    comint-add-to-input-history                           1           1.2823e-05    1.2823e-05
    comint-adjust-window-point                            1           4.201e-06     4.201e-06
    comint-preinput-scroll-to-bottom                      3           2.708e-06     9.026...e-07
    python-util-comint-last-prompt                        6           2.490...e-06  4.150...e-07
    comint-snapshot-last-prompt                           2           2.462e-06     1.231e-06

[0] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13675

Cheers,
Fabián