Simon,

Yes, I tried to play with touch bar preferences, to no avail.

On the bright side, I also tested your build. Both debug and release version 
work. There was one NS warning in the release version, but it did not affected 
at all the test (I was running the same sequence as I described in the original 
message).

In the following transfer are the sampler files for both versions:
https://www.dropbox.com/t/xDqbbZma9i0XdHBk

I am tempted to slide the new release version to /Applicaitons and use it 
instead of the one shipped with the CRAN release; is it safe to do so?

Yan


On May 7, 2021, at 2:27 PM, Simon Urbanek 
<simon.urba...@r-project.org<mailto:simon.urba...@r-project.org>> wrote:

Yan,

it's ok, I didn't need the Debug version.

However, did you check the Touch Bar settings as discussed previously to see if 
disabling the app Touch Bar fixes the problem?
If it does, there may be hope - I have created a test version at
https://github.com/R-macos/Mac-GUI/actions/runs/820226842
at the bottom there is "R-GUI-Build" link under Artifacts which gives you a zip 
file with R-GUI-Build.dmg image which has both release and debug version which 
disable the Touch Bar for the console (built for R 4.0.x). Please let me know 
if that works for you.

Thanks,
Simon



On May 7, 2021, at 2:37 AM, ALPEROVYCH Yan <alperov...@em-lyon.com> wrote:

Thank you Simon,

Brandon suggested to use the debug version of the R-gui, but you seem to be ok 
with what I sent. Please let me know if you also want the sampler files using 
the the debug version.

Also, if you need me to test the fixes / updates, please don’t hesitate.

Yan


On May 6, 2021, at 4:30 AM, Simon Urbanek <simon.urba...@r-project.org> wrote:

Yan,

thank you for the sampler files!

From cursory glance the issue seems to be the touch bar, an amazing amount of 
time is spent in the Apple's touchbar API (almost all of it is in some way 
related to [NSTextView(NSTextView_TouchBar_API) updateTextTouchBarItems]). That 
also explains why I was not able to reproduce it, because I don't have a Mac 
with touch bar and Big Sur. I don't know what is available in the settings, but 
you may want to see if you can adjust your touch bar system preferences (if I 
recall there are different options for the touch bar) - the R GUI doesn't use 
the touch bar at all, so the issue is entirely at the system level. I will look 
is there is anything we can do to block the touch bar API on our end or 
otherwise deal with it by have R explicitly handle the touch bar.

Thanks,
Simon



On 4/05/2021, at 7:10 PM, ALPEROVYCH Yan <alperov...@em-lyon.com> wrote:

Simon,

I sampled the process of my test (the slowdown). I was able to do it without 
downloading the "Debug" version. There are two files attached.
1. The first one (run at 8:58:14 am) is the replication of my test (the 
slowdown) using the external editor
2. The second (run at 9:05:09 am) is the replication of my test using the 
in-built editor

While doing the second sampling R also popped the red warnings (if that is 
useful).

I am also answering Peter’s question: my version of Big Sur is 11.3.

Let me know what else I can do to help.
Yan


On May 4, 2021, at 5:53 AM, Simon Urbanek <simon.urba...@r-project.org> wrote:

Yan,

thanks for the reports. I cannot reproduce the slow-down, either (Mac mini M1, 
Big Sur 11.3).

However, you can help by sampling the R process and sending the sample to me. 
You can do that as follows:

1) open R.app
2) open Terminal (under Applications -> Utilities)
3) in Terminal type:

sample R 30

4) switch to R and perform your test. You have 30 seconds (that's the number 
above which specifies how long the sampler will run) to do it. In Terminal it 
will show the sampler output -in the beginning it will also tell you the 
location of the text file - it's typically /tmp/R_*.sample.txt - send that file 
to me.

It may not allow you to debug the released version of the GUI, so you may need 
to download the "Debug" version of the GUI (scroll down) from

https://mac.R-project.org

You should pick the
Mac OS X GUI rev.XXX for R 4.0.x
high-sierra-Release.dmg
download if you have R 4.0.x. You don't need to install the GUI, you can run it 
directly from the image so it won't affect your installed version.

Thanks,
Simon

PS: you may need to install Xcode command line tools if you didn't already:
sudo xcode-select --install


On 4/05/2021, at 3:06 AM, ALPEROVYCH Yan <alperov...@em-lyon.com> wrote:

Dear Peter, Simon,

Since I am not that of an expert in programming, is there any way to trace what 
happens 'under the hood' of the gui to see what exactly slows down the 
rendering of output on my end?

On the warnings, some more came today. How that happened and the text that came 
out are below.

Thank you for your help,
Yan

I looked at the Preferences -> Editor (once the window popped up, I clicked on 
the Editor with a mouse and the error came).
...
2021-05-03 16:50:36.184 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd104c17b0>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
2021-05-03 16:50:36.186 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd09dde780>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
…

In another instance, hitting cmd-n (new native editor window) gave me this:
...
2021-05-03 16:59:03.469 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd1075a9b0>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
2021-05-03 16:59:03.471 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd1075c140>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
2021-05-03 16:59:22.225 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd1270c2e0>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
2021-05-03 16:59:22.226 R[73442:2450140] Warning: Expected min height of view: 
(<NSPopoverTouchBarItemButton: 0x7ffd1270d070>) to be less than or equal to 30 
but got a height of 32.000000. This error will be logged once per view in 
violation.
…

When in native editor, I hit cmd-w (popping the save file request) gave me this:
...
2021-05-03 16:59:24.024 R[73442:2450140] Warning: Expected min height of view: 
(<NSButton: 0x7ffd1271c7a0>) to be less than or equal to 30 but got a height of 
32.000000. This error will be logged once per view in violation.
...


On May 2, 2021, at 11:03 AM, peter dalgaard 
<pda...@gmail.com<mailto:pda...@gmail.com>> wrote:

2019 MB Air here, Big Sur, 4.0.5 off CRAN. I don't see the issue either. (I do 
see the "...warmup" thing, though.)

- Peter D.

On 1 May 2021, at 21:01 , ALPEROVYCH Yan 
<alperov...@em-lyon.com<mailto:alperov...@em-lyon.com>> wrote:

Thank you Simon,

Regarding the "NS..." warnings, the following came just now when I closed the 
plot window (after a ggplot) with a mouse.

2021-05-01 20:53:35.117 R[2344:57535] +[NSSavePanel _warmUp] attempted warmup

Since they are usually random, I will log them for some time, and report back.

Yan

On May 1, 2021, at 7:00 AM, Simon Urbanek 
<simon.urba...@r-project.org<mailto:simon.urba...@r-project.org><mailto:simon.urba...@r-project.org>>
 wrote:

Yan,

Thank you for the report, comments inline.


On May 1, 2021, at 03:56, ALPEROVYCH Yan 
<alperov...@em-lyon.com<mailto:alperov...@em-lyon.com><mailto:alperov...@em-lyon.com>>
 wrote:

Dear all,

Beyond the occasional red warnings about the 'NSPop….' buttons, warmups, etc. 
and similar issues reported elsewhere here I’ve noted the slowdown of R console 
with more and more output. Here is what I do to reliably reproduced it on my 
machine - MacBook Pro 2017 with Touch Bar (sessionInfo() is below).


There are no known issues in R 4.0.5 so if you see any please report them.


1. Start fresh R-gui

2. Paste the following text in the editor. Note that lines are commented, this 
is enough to show the problem. It obvisouly gets worse if R has to evaluate.

# m[[ 1]] <- .f(update(fml, . ~ . -x1 + x2))
# m[[ 2]] <- .f(update(fml, . ~ . -x1 + x2 + x3))
# m[[ 3]] <- .f(update(fml, . ~ . -x1 + x2 + x4))
# m[[ 4]] <- .f(update(fml, . ~ . -x1 + x2 + x5))
# m[[ 5]] <- .f(update(fml, . ~ . -x1 + x2 + x6))
# m[[ 6]] <- .f(update(fml, . ~ . -x1 + x2 + x7))
# m[[ 7]] <- .f(update(fml, . ~ . -x1 + x2 + x8))
# m[[ 8]] <- .f(update(fml, . ~ . -x1 + x2 + x9))
# m[[ 9]] <- .f(update(fml, . ~ . -x1 + x2 + x10))
# m[[10]] <- .f(update(fml, . ~ . -x1 + x2 + x11))

3. Execute as block once - the output appears almost immediately. Execute the 
second time - the slight delay is already noticeable. Continue to 3-4 time and 
the delay between the Cmd+Enter and the output is now up to 3-4 seconds and 
occasional beachball…


Thanks, I only have Catalina here and it does not exhibit that behaviour, the 
execution is always immediate. I'll try on the M1 Big Sur machine on Monday.

Thanks,
Simon



Any help is greatly appreciated.
Yan

Here is the sessionInfo()

******
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: 
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_4.0.5


Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org<mailto:R-SIG-Mac@r-project.org><mailto:R-SIG-Mac@r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd....@cbs.dk<mailto:pd....@cbs.dk>  Priv: 
pda...@gmail.com<mailto:pda...@gmail.com>

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org<mailto:R-SIG-Mac@r-project.org>
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.
<R_2021-05-04_085814_nXVv.sample.txt><R_2021-05-04_090509_kVEq.sample.txt>_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.


Ce message électronique et tous les fichiers attachés qu'il contient sont 
confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils 
sont adressés. Si vous avez reçu ce message par erreur, merci de le retourner à 
son émetteur. Les idées et opinions présentées dans ce message sont celles de 
son auteur, et ne représentent pas nécessairement celles de l’institution ou 
les entités affiliées dont dépend l’auteur. La publication, l'usage, la 
distribution, l'impression ou la copie non autorisée de ce message et des 
attachements qu'il contient sont strictement interdits ». “This email and any 
files transmitted with it are confidential and intended solely for the use of 
the individual or entity to whom they are addressed. If you have received this 
email in error please return it to the sender. The ideas and views expressed in 
this email are solely those of its author, and do not necessarily represent the 
views of the institution or company the author is dependent from. Unauthorized 
publication, use, distribution, printing or copying of this e-mail or any 
attached files is strictly forbidden.

        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to