Note added 2002. Computers have gotten a lot faster, so most of the optimizations discussed below will not be necessary on new machines. I am leaving this stuff in the manual for people who want to write thick books, where some of it still might be useful.
Implementing the principle of least surprises, the default settings of RefTeX ensure a safe ride for beginners and casual users. However, when using RefTeX for a large project and/or on a small computer, there are ways to improve speed or memory usage.
(setq reftex-keep-temporary-buffers nil)
reftex-label(C-u C-c (),
reftex-reference(C-u C-c )),
reftex-citation(C-u C-c [),
reftex-toc(C-u C-c =), and
reftex-view-crossref(C-u C-c &) initiates re-parsing of the entire document in order to update the parsing information. For a large document this can be unnecessary, in particular if only one file has changed. RefTeX can be configured to do partial scans instead of full ones. C-u re-parsing then does apply only to the current buffer and files included from it. Likewise, the r key in both the label selection buffer and the table-of-contents buffer will only prompt scanning of the file in which the label or section macro near the cursor was defined. Re-parsing of the entire document is still available by using C-u C-u as a prefix, or the capital R key in the menus. To use this feature, try
(setq reftex-enable-partial-scans t)
reftex-modeor when you exit Emacs. The information is restored when you begin working with a document in a new editing session. To use this feature, put into .emacs:
(setq reftex-save-parse-info t)
(setq reftex-trust-label-prefix '("fn:" "eq:"))
(setq reftex-allow-automatic-rescan nil)
RefTeX will then occasionally annotate new labels in the selection buffer, saying that their position in the label list in uncertain. A manual document scan will fix this.
reftex-label. Updating the buffer takes as long as recreating it - so the time saving is limited to cases where no new labels of that category have been added. To turn on this feature, use
(setq reftex-use-multiple-selection-buffers t)
You can also inhibit the automatic updating entirely. Then the selection buffer will always pop up very fast, but may not contain the most recently defined labels. You can always update the buffer by hand, with the g key. To get this behavior, use instead
(setq reftex-use-multiple-selection-buffers t reftex-auto-update-selection-buffers nil)
As a summary, here are the settings I recommend for heavy use of RefTeX with large documents:
(setq reftex-enable-partial-scans t reftex-save-parse-info t reftex-use-multiple-selection-buffers t)