[ESS] Slow help culprit found!
spinuvit.list at gmail.com
Sat Oct 23 12:01:39 CEST 2010
Dear ESS Core,
I've looked into the ess-help code motivated by a very slow \C-c\C-v, which I
reported last month (http://thread.gmane.org/gmane.emacs.ess.general/4695).
There was a change introduced recently.
The function `ess-find-help-file' was modified to call newly added
The latest takes awfully lot (4 sec) on my machine (Intel Core 2, 2.13 Ghz,
2GB), with 12 attached packages.
The rationale of calling that function in `ess-find-help-file', is somewhat
elusive to me:
(ess-uniq-list (append (ess-g et-help-files-list)
It examines only *attached* packages, and thus, brings only duplication
(anything else?) of already comprehensive (but efficient) `ess-get-object-list'.
Moreover , `ess-get-help-aliases-list' does not cache anything and rereads all
the RDS files each time one calls \C-c\C-v.
In addition, given the huge number of object, 'ess-uniq-list' is time
consuming and is used redundantly. Once in the `ess-find-help-file' and in the
code of `ess-get-help-aliases-list'.
Also, the construct (mapcar 'list ...) probably could be dispensed with, since
`ess-uniq-list' works quite happily directly on the list of strings returned by
With your permission, I would like to suggest to make the "help-aliases"
functionality available only on \C-u prefix. Also enhancing it, to search all
the installed packages not only loaded ones.
R version 2.12.0 (2010-10-15)
Platform: i386-pc-mingw32/i386 (32-bit)
 LC_COLLATE=English_United States.1252
 LC_CTYPE=English_United States.1252
 LC_MONETARY=English_United States.1252
 LC_TIME=English_United States.1252
attached base packages:
 stats datasets grid graphics utils grDevices methods
other attached packages:
 sos_1.3-0 brew_1.0-4 Rgraphviz_1.27.0
 graph_1.26.0 fortunes_1.4-0 latticeExtra_0.6-14
 lattice_0.19-13 RColorBrewer_1.0-2 ggplot2_0.8.8
 proto_0.3-8 reshape_0.8.3 plyr_1.2.1
loaded via a namespace (and not attached):
More information about the ESS-help