# long string output cells on macOS and Chrome

**URL:** <https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703>\
**Category:** Help\
**Created:** [February 27, 2019, 7:36pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703 "2019-02-27T19:36:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)\
**Post date:** [February 27, 2019, 7:36pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/1 "2019-02-27T19:36:06Z")

</div>

When I click the “Show XXXXX truncated lines” in either of the output cells in this notebook in Chrome (on macOS), after a certain point the output becomes white, and the other string cell becomes white as well. (I can still select text in the other cell but it doesn’t get highlighted. I can even click on the expand link there too and the other cell gets bigger):

> **[Long string output?](https://observablehq.com/d/f7e52560b9fcc356)**
>
> An Observable notebook by Bryan Gin-ge Chen.

Can anyone else reproduce this? Expanding the output works fine for me in Chrome on Windows and in Firefox and Safari.

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [February 27, 2019, 10:00pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/2 "2019-02-27T22:00:17Z")

</div>

Sadly, it appears that macOS Chrome (at least) does not take well to rendering an iframe that is 440,491px tall. We’ll probably need to implement some fancier logic around how we display very large strings.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [February 27, 2019, 10:11pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/3 "2019-02-27T22:11:32Z")

</div>

Can’t replicate it on MacOS High Sierra, Chrome 72.0.3626.109. I see short flashes of white when scrolling, but the new part still pops in less than a second later.

What is your graphics card and display resolution?

---

<div class="post-metadata">

**Author:** ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)\
**Post date:** [February 27, 2019, 11:42pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/4 "2019-02-27T23:42:00Z")

</div>

My MacBook is on Mojave and Chrome is version 72.0.3626.119. The graphics card is the AMD Radeon Pro 560X and the display resolution is 2880 x 1800 Retina.

By the way, I first noticed this issue in a separate notebook with ~10 cells with ~700 line long strings. When I refresh that notebook and expand a cell, I also see short flashes of white while scrolling, but after working for “a while” (presumably after expanding and reloading the long string outputs multiple times) eventually all other cells remain white when I expand one of the string outputs.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [February 28, 2019, 12:12am UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/5 "2019-02-28T00:12:34Z")

</div>

I encountered a different issue while trying to replicate this: When the first cell is expanded and I focus and save the cell, the viewport seemingly blanks out because the its height doesn’t update to the now truncated cell height.

Interestingly this only happens on the first attempt. If I scroll to the top the viewport height updates, and also updates properly on all additional attempts.

@mbostock Would it help if I recorded a performance profile for you guys?

Edit: That’s weird. I still have a performance profile saved where the effect can be seen, but now I can’t reproduce it anymore.

Edit 2: OK, I can still reproduce it ~~, but not reliably.~~ If the cell is saved while the cursor is outside the viewport, the viewport height won’t update until one hovers over the updated cell output. So, likely a very low-priority issue.

---

<div class="post-metadata">

**Author:** ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)\
**Post date:** [June 4, 2019, 6:41pm UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/6 "2019-06-04T18:41:36Z")

</div>

I ran into this issue again today so I did some more digging and I think I’ve found the culprit.

For reference, here’s another test notebook:

> **[Tall notebook](https://observablehq.com/d/04aba122620a1113)**
>
> An Observable notebook by Bryan Gin-ge Chen.

I can reliably trigger flickering (in Chrome on macOS) by making the numbers in this notebook sufficiently large (for me, whenever the iframe is made to be above ~25000px and there are more than ~500 link elements, the entire page flashes whenever the cursor blinks).

After some more searching, I found [“Issue 852348: Chrome 67 + macos built in display + iframe = screen flickering”](https://bugs.chromium.org/p/chromium/issues/detail?id=852348) on the Chromium bug tracker.

When I tried disabling site isolation (temporarily) per the comments there, the issues in this notebook and the one in my original post go away so I’m now convinced that this is the underlying problem.

---

<div class="post-metadata">

**Author:** ![bgchen](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/bgchen/32/784_2.png) [@bgchen](https://talk.observablehq.com/u/bgchen)\
**Post date:** [September 10, 2019, 5:49am UTC](https://talk.observablehq.com/t/long-string-output-cells-on-macos-and-chrome/1703/7 "2019-09-10T05:49:22Z")

</div>

An update: a (partial) fix for this issue is now in [Chrome Canary](https://www.google.com/chrome/canary/)! It seems the relevant CL will be merged into Chrome 78 as well, so look forward to that in stable Chrome towards the end of October, hopefully.

As I commented on [the Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=852348#c99), there’s still a small amount of flickering / artifacts but at least previously affected pages are now mostly usable.
