Subject: bug#11624: Slowness with virtual groups

From: John Wiegley <[email-masked]>
Date: Tue, 12 Jun 2012 13:39:01 -0500

>>>>> Lars Magne Ingebrigtsen <[email-masked]> writes:

> John Wiegley <[email-masked]> writes:
>> I recently added a LOT of read messages to some groups I have mapped in an
>> nnvirtual group.  Now, every time I hit 'g' in my *Group* buffer, it takes
>> 44 seconds for nothing to happen.  It takes this long every time I hit 'g',
>> even if done immediately after.
>> 
>> Here are the ELP results:

> Does `M-g' on the virtual group also take 44 seconds?  If so, can you send
> the ELP output on `M-g'-ing the virtual group?

M-g on the virtual group -- which references 25 local (Dovecot) IMAP groups --
takes 18s when there is no new mail available.  Below are the ELP results.

John

gnus-activate-group                           27          18.722542     0.6934274814
gnus-topic-get-new-news-this-topic            1           12.326267     12.326267
gnus-group-get-new-news-this-group            1           12.326228     12.326228
nnvirtual-request-group                       1           12.322866     12.322866
nnvirtual-create-mapping                      1           12.322745     12.322745
nnimap-request-group                          25          6.396344      0.25585376
nnimap-update-infos                           25          3.742512      0.14970048
nnimap-update-info                            25          3.741962      0.14967848
gnus-set-difference                           50          3.7230020000  0.0744600400
nnvirtual-reverse-map-article                 509809      1.8513919999  3.631...e-06
nnimap-wait-for-response                      25          1.785377      0.07141508
nnimap-parse-flags                            25          0.815576      0.03262304
nnvirtual-merge-sorted-lists                  15          0.692959      0.0461972666
nnheader-accept-process-output                384         0.2845970000  0.0007411380
gnus-compress-sequence                        264         0.1363189999  0.0005163598
nnimap-flags-to-marks                         25          0.047354      0.00189416
gnus-cache-articles-in-group                  25          0.0030949999  0.0001237999
gnus-cache-file-name                          25          0.0019930000  7.972...e-05
gnus-run-hooks                                3           0.00156       0.00052
gnus-delay-send-queue                         1           0.001551      0.001551
gnus-group-update-group                       1           0.001342      0.001342
gnus-group-set-parameter                      100         0.0012220000  1.222...e-05
nndraft-request-group                         1           0.001172      0.001172
gnus-topic-update-topic-line                  3           0.001032      0.0003439999
nnimap-send-command                           50          0.0010130000  2.026...e-05
gnus-server-opened                            27          0.0007809999  2.892...e-05
gnus-topic-update-topics-containing-group     1           0.000607      0.000607
nndraft-possibly-change-group                 1           0.000553      0.000553
nnimap-server-opened                          50          0.000548      1.096e-05
nndraft-open-server                           1           0.000532      0.000532
nnoo-parent-function                          1           0.000436      0.000436
nnimap-decode-gnus-group                      50          0.000427      8.540...e-06
nnmh-request-group                            1           0.00038       0.00038
gnus-range-difference                         50          0.0003670000  7.340...e-06
gnus-group-insert-group-line-info             1           0.000357      0.000357
nnimap-possibly-change-group                  25          0.0003469999  1.387...e-05
gnus-group-insert-group-line                  1           0.000346      0.000346
gnus-agent-possibly-alter-active              28          0.0003050000  1.089...e-05
nnmail-group-pathname                         3           0.000249      8.3e-05
gnus-parse-active                             27          0.0002180000  8.074...e-06
nnimap-store-info                             50          0.0001819999  3.639...e-06
gnus-cache-decoded-group-name                 25          0.0001730000  6.920...e-06
nndraft-articles                              1           0.000152      0.000152
gnus-topic-insert-topic-line                  3           0.000149      4.966...e-05
nnmh-possibly-change-directory                1           0.000142      0.000142
gnus-group-remove-parameter                   100         0.0001309999  1.309...e-06
gnus-topic-find-groups                        3           0.0001219999  4.066...e-05
nnimap-buffer                                 25          0.0001150000  4.600...e-06
gnus-topic-parent-topic                       17          0.0001129999  6.647...e-06
nnimap-find-connection                        50          0.0001039999  2.079...e-06
gnus-group-name-decode                        3           0.000103      3.433...e-05
gnus-agent-method-p                           29          0.0001009999  3.482...e-06
gnus-find-method-for-group                    6           9.6e-05       1.6e-05
gnus-info-set-entry                           125         8.799...e-05  7.039...e-07
gnus-make-directory                           1           8.3e-05       8.3e-05
gnus-group-prev-unread-group-same-level       1           8.2e-05       8.2e-05
gnus-group-remove-mark                        1           8e-05         8e-05
gnus-list-of-unread-articles                  25          7.800...e-05  3.120...e-06
gnus-group-position-point                     5           7.3e-05       1.459...e-05
gnus-request-update-info                      1           7.2e-05       7.2e-05
gnus-group-next-unread-group                  2           6.9e-05       3.45e-05
nnheader-insert                               2           6.9e-05       3.45e-05
gnus-group-highlight-line                     1           6e-05         6e-05
gnus-group-mark-group                         1           5.6e-05       5.6e-05
gnus-group-search-forward                     2           5.6e-05       2.8e-05
gnus-online                                   55          5.399...e-05  9.818...e-07
gnus-summary-buffer-name                      1           5.1e-05       5.1e-05
gnus-group-set-mode-line                      1           5.1e-05       5.1e-05
gnus-goto-colon                               5           4.9e-05       9.8e-06
gnus-group-decoded-name                       1           4.5e-05       4.5e-05
gnus-server-status                            27          4.4e-05       1.629...e-06
nnoo-current-server                           56          4.399...e-05  7.857...e-07
gnus-topic-goto-topic                         4           4e-05         1e-05
gnus-topic-find-topology                      8           3.500...e-05  4.375...e-06
gnus-mode-line-buffer-identification          1           3.5e-05       3.5e-05
gnus-group-update-eval-form                   1           3.4e-05       3.4e-05
gnus-range-add                                2           3.2e-05       1.6e-05
gnus-group-name-charset                       2           3.1e-05       1.55e-05
gnus-get-unread-articles-in-group             1           2.8e-05       2.8e-05
nnoo-change-server                            2           2.600...e-05  1.300...e-05
nnimap-log-command                            50          2.500...e-05  5.000...e-07
nnheader-init-server-buffer                   1           2.5e-05       2.5e-05
nnheader-translate-file-chars                 28          2.100...e-05  7.500...e-07
gnus-group-topic-p                            1           2.1e-05       2.1e-05
nnoo-server-opened                            3           2e-05         6.666...e-06
nnheader-report                               2           1.999...e-05  9.999...e-06
nnvirtual-request-update-info                 2           1.999...e-05  9.999...e-06
gnus-emacs-version                            1           1.9e-05       1.9e-05
nnimap-find-process-buffer                    25          1.700...e-05  6.800...e-07
gnus-group-process-prefix                     1           1.6e-05       1.6e-05
gnus-group-get-parameter                      2           1.6e-05       8e-06
gnus-use-long-file-name                       25          1.500...e-05  6.000...e-07
gnus-add-text-properties                      7           1.499...e-05  2.142...e-06
gnus-group-timestamp-delta                    1           1.4e-05       1.4e-05
gnus-virtual-group-p                          1           1.4e-05       1.4e-05
nnoo-backend                                  1           1.4e-05       1.4e-05
nndraft-server-opened                         1           1.4e-05       1.4e-05
gnus-methods-equal-p                          16          1.300...e-05  8.125...e-07
gnus-group-topic-name                         1           1.3e-05       1.3e-05
gnus-group-group-level                        1           1.2e-05       1.2e-05
gnus-group-goto-group                         1           1.2e-05       1.2e-05
nnvirtual-possibly-change-server              3           1.2e-05       4e-06
gnus-put-text-property                        5           1.1e-05       2.2e-06
nnvirtual-server-opened                       1           1.1e-05       1.1e-05
nnmh-server-opened                            1           1.1e-05       1.1e-05
gnus-get-function                             1           9e-06         9e-06
gnus-group-topic-unread                       8           9e-06         1.125e-06
gnus-put-text-property-excluding-characters-with-faces 1           9e-06         9e-06
nnheader-replace-duplicate-chars-in-string    3           8e-06         2.666...e-06
nnvirtual-current-group                       3           7e-06         2.333...e-06
gnus-undo-boundary                            4           6e-06         1.5e-06
gnus-group-parameter-value                    2           6e-06         3e-06
gnus-methods-sloppily-equal                   7           5.999...e-06  8.571...e-07
gnus-agent-save-group-info                    1           5e-06         5e-06
gnus-group-group-indentation                  2           4.999...e-06  2.499...e-06
gnus-group-group-name                         2           4.999...e-06  2.499...e-06
nnoo-parents                                  4           4.999...e-06  1.249...e-06
gnus-topic-update-unreads                     3           4e-06         1.333...e-06
nnheader-concat                               1           4e-06         4e-06
gnus-group-topic-level                        3           3e-06         1e-06
gnus-topic-visible-p                          3           3e-06         1e-06
gnus-remove-denial                            1           2e-06         2e-06
gnus-region-active-p                          1           2e-06         2e-06
nnoo-variables                                2           2e-06         1e-06
nnheader-re-read-dir                          2           2e-06         1e-06
gnus-group-get-icon                           1           1e-06         1e-06
gnus-topic-unread                             1           1e-06         1e-06
gnus-extent-start-open                        1           1e-06         1e-06
gnus-range-length                             1           1e-06         1e-06