[R-SIG-Mac] Very long wait opening certain *.R files, Mac R 2.5.0

Matthew Keller mckellercran at gmail.com
Tue Jul 3 02:24:01 CEST 2007


Hi all,

Thanks for the help. Disabling syntax highlighting does the trick.
Just a note: long scripts and long for loops cannot, or at least
should not, always be avoided. Thanks!

Matt


On 6/30/07, Simon Urbanek <simon.urbanek at r-project.org> wrote:
>
> On Jun 28, 2007, at 5:10 PM, Douglas Bates wrote:
>
> > On 6/28/07, Matthew Keller <mckellercran at gmail.com> wrote:
> >> Hi all,
> >>
> >> I'm a recent convert, still trying to get used to this new OS. I
> >> use R
> >> everyday for my work.
> >>
> >> I have a new Intel MacBook Pro, and installed R 2.5.0. Using the GUI,
> >> when I try to open a large *.R script (from File -> Open or by double
> >> clicking the file), it takes about 1-2 minutes to open. The script is
> >> about 3000 lines long and there are very long and nested loops in it.
> >> Files that are shorter open increasingly quickly, so this behavior
> >> seems to be a function of script length. Still, it takes a text
> >> editor
> >> less than a second to open the 3000 lines long file.
> >>
> >> Does anyone have any ideas on what might be causing this? Does the
> >> Mac
> >> version of R run some kind of code automatically when script files
> >> are
> >> opened? Thanks in advance...
> >
> > Perhaps Simon inserted code in the GUI to cause the delay, as a subtle
> > hint that 3000 line R scripts with very long and nested loops are to
> > be discouraged.  :-)
> >
>
> True - maybe I should have added the message as well so the hint not
> as subtle ;).
>
> Anyway, it's the syntax highlighting which runs synchronously on open
> and can be slow for long documents. I'm experimenting with
> asynchronous sh for the new GUI which should remedy this issue. As
> Rob noted, temporary remedy is to disable syntax highlighting for
> such documents.
>
> Cheers,
> Simon
>
>
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> >
> >
>
>


-- 
Matthew C Keller
Postdoctoral Fellow
Virginia Institute for Psychiatric and Behavioral Genetics



More information about the R-SIG-Mac mailing list