html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/5201#issuecomment-1486194899,https://api.github.com/repos/pydata/xarray/issues/5201,1486194899,IC_kwDOAMm_X85YlYjT,2448579,2023-03-28T04:21:37Z,2023-03-28T04:21:37Z,MEMBER,Closing as upstream issue ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872069660,https://api.github.com/repos/pydata/xarray/issues/5201,872069660,MDEyOklzc3VlQ29tbWVudDg3MjA2OTY2MA==,4160723,2021-07-01T09:08:22Z,2021-07-01T09:08:22Z,MEMBER,xref: https://github.com/jupyterlab/jupyterlab/issues/8971,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872062632,https://api.github.com/repos/pydata/xarray/issues/5201,872062632,MDEyOklzc3VlQ29tbWVudDg3MjA2MjYzMg==,4160723,2021-07-01T09:00:12Z,2021-07-01T09:00:31Z,MEMBER,"Here are some profiling results on my laptop (MacOS 11.2, MacBook Pro 13-inch, 2019).
versions:
chrome: 91.0.4472.114
jupyterlab: 3.0.14
xarray: (master)
pandas: 1.2.2
The results below only show the refresh of the ouput cell when I re-execute it (I used the screenshots in chrome's web developer tools to manually set the time span of interest on the profiling timeline).
I've also measured the rendering of a very basic pandas dataframe using
```python
import xarray as xr
import numpy as np
import pandas as pd
data = np.random.rand(4)
a = xr.DataArray(data, coords=[np.arange(4)], dims=['x'])
df = pd.DataFrame({'col': data})
```
#### pandas / no additional cell
##### pandas / many empty cells
#### xarray / no additional cell
#### xarray / many empty cells
So it seems to me that it's more a Jupyter notebook issue. The decrease in performance (rendering time) scales pretty much the same for pandas and xarray reprs.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872054936,https://api.github.com/repos/pydata/xarray/issues/5201,872054936,MDEyOklzc3VlQ29tbWVudDg3MjA1NDkzNg==,12912489,2021-07-01T08:49:04Z,2021-07-01T08:49:04Z,NONE,"Before:
After:
On the top band, I have used the screenshot-timeline to zoom onto the time window where the cell is being executed (marked with `[*]`), before the new output is displayed. You should be able to see that the time-scale is bastly different. ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872042733,https://api.github.com/repos/pydata/xarray/issues/5201,872042733,MDEyOklzc3VlQ29tbWVudDg3MjA0MjczMw==,6815844,2021-07-01T08:31:46Z,2021-07-01T08:31:46Z,MEMBER,"> Maybe a Jupyter issue and not related to libraries in use?
I see. Indeed, I didn't see any significant difference among branches.
> I may be able later today when I am back to my main computer
I tried but I think maybe better to wait for your update.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872037862,https://api.github.com/repos/pydata/xarray/issues/5201,872037862,MDEyOklzc3VlQ29tbWVudDg3MjAzNzg2Mg==,12912489,2021-07-01T08:25:12Z,2021-07-01T08:25:12Z,NONE,"> Maybe can we measure the first-loading time?
> I observe the first-loading time is very long...
I think this is also a problem, but I believe this is independent and not improved by the CSS changes in this branch. Maybe a Jupyter issue and not related to libraries in use?
> > The only way I was able to see it was to use the Web Dev tools that come as part of Firefox or Chrome.
>
> Can you tell me more about this? I'll try to reproduce and measure the performance.
So I had used Chrome, open ""Developer Tools"" > ""Performance"" tab:
- start recording a profile
- run a cell the displays HTML output
- stop profile
I think I had observed a difference in the ""Render"" part of the profile, but I cannot check now (I may be able later today when I am back to my main computer).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872033015,https://api.github.com/repos/pydata/xarray/issues/5201,872033015,MDEyOklzc3VlQ29tbWVudDg3MjAzMzAxNQ==,6815844,2021-07-01T08:18:55Z,2021-07-01T08:18:55Z,MEMBER,"Maybe can we measure the first-loading time?
I observe the first-loading time is very long...
(movie)
> The only way I was able to see it was to use the Web Dev tools that come as part of Firefox or Chrome.
Can you tell me more about this? I'll try to reproduce and measure the performance.
https://user-images.githubusercontent.com/6815844/124090964-4e601e80-da90-11eb-8333-7c2a25a8f33d.mp4
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872013761,https://api.github.com/repos/pydata/xarray/issues/5201,872013761,MDEyOklzc3VlQ29tbWVudDg3MjAxMzc2MQ==,12912489,2021-07-01T07:54:15Z,2021-07-01T07:54:15Z,NONE,"Indeed, such timings do *not* include the CSS timings. The only way I was able to see it was to use the Web Dev tools that come as part of Firefox or Chrome. You should be able to see the timings included there when recording a profile.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-872007738,https://api.github.com/repos/pydata/xarray/issues/5201,872007738,MDEyOklzc3VlQ29tbWVudDg3MjAwNzczOA==,6815844,2021-07-01T07:45:01Z,2021-07-01T07:45:01Z,MEMBER,"> did you try if there are differences when running an individual cell, not just when loading the page the first time?
I tried to measure the performance
by running all the cells as shown in the image

but I could not find any significant difference.
However, I'm not very confident if this actually measures the css performance.
@SimonHeybrock, do you have any suggestions how to measure the peformance?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-871996744,https://api.github.com/repos/pydata/xarray/issues/5201,871996744,MDEyOklzc3VlQ29tbWVudDg3MTk5Njc0NA==,12912489,2021-07-01T07:26:50Z,2021-07-01T07:26:50Z,NONE,"@fujiisoup Maybe I missed it in the video, but did you try if there are differences when running an individual cell, not just when loading the page the first time? My point is:
- When a page is first loaded, obviously the CSS for everything (all cells) has to be processed. That cannot be changed.
- When updated a single cell, prior to this branch, it triggered CSS changes for all cells.
- With this branch, only current cell should be affected.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-871748248,https://api.github.com/repos/pydata/xarray/issues/5201,871748248,MDEyOklzc3VlQ29tbWVudDg3MTc0ODI0OA==,6815844,2021-06-30T21:45:52Z,2021-06-30T21:45:52Z,MEMBER,"I am trying to measure the performance of master, this PR and [mine (which fixes this PR to be compatible with dark mode)](https://github.com/fujiisoup/xarray/blob/6225f158626e75977a0a944fbc09c50769884e35/xarray/static/css/style.css#L5-L29) but couldn't see any big difference in my environment.
What I did in this experiment is to make a notebook with hundreds of empty cells with xarray under these branches.
Refreshed the browser to render the htmls.
Number of cells are the same in all these experiments, but only the xarray branches (and produced html) are different.
Maybe we may need more cells?
Any advice would be appreciated.
https://user-images.githubusercontent.com/6815844/124035536-9ef75d80-da37-11eb-9c78-a9c76d16da1a.mp4
movie
top left: this branch
top right: mine
bottom left: master
","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-870045898,https://api.github.com/repos/pydata/xarray/issues/5201,870045898,MDEyOklzc3VlQ29tbWVudDg3MDA0NTg5OA==,5635139,2021-06-28T21:12:30Z,2021-06-28T21:12:30Z,MEMBER,"Marked this as ""plan to merge"" — please comment if you think that's a bad tradeoff between performance and dark mode.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-860087366,https://api.github.com/repos/pydata/xarray/issues/5201,860087366,MDEyOklzc3VlQ29tbWVudDg2MDA4NzM2Ng==,5635139,2021-06-12T17:55:20Z,2021-06-12T17:55:20Z,MEMBER,"It would be a shame to lose the benefits of this.
- It seems like between us we're not going to figure out the dark mode issue. Are there any CSS people out there who could offer guidance?
- Assuming not, should we merge this knowing dark mode* will look worse? I wrote above we should fix it, but I had thought that was a few extra lines, rather than intractable. I would probably vote to prioritize performance above aesthetics.
(* Did you know that research suggests we're either the same or slightly better at reading light mode?? Is dark mode LARPing?)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828794224,https://api.github.com/repos/pydata/xarray/issues/5201,828794224,MDEyOklzc3VlQ29tbWVudDgyODc5NDIyNA==,6815844,2021-04-28T21:33:06Z,2021-04-28T21:33:06Z,MEMBER,"This
https://github.com/fujiisoup/xarray/blob/6225f158626e75977a0a944fbc09c50769884e35/xarray/static/css/style.css#L5-L29
looks working with a darkmode, but I'm not sure if this solves the original problem.
It looks to me that defining custom properties in `html[theme=dark]` may cause the same problem.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828778799,https://api.github.com/repos/pydata/xarray/issues/5201,828778799,MDEyOklzc3VlQ29tbWVudDgyODc3ODc5OQ==,6815844,2021-04-28T21:03:50Z,2021-04-28T21:03:50Z,MEMBER,"Confirmed that this also breaks the darkmode also in google colab.
> @fujiisoup added the vscode dark mode support, maybe he has ideas.
I did it in #4036 but this was actually a workaround and should be improved by an expert.
I'll take a look, but with little hope to fix.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828727147,https://api.github.com/repos/pydata/xarray/issues/5201,828727147,MDEyOklzc3VlQ29tbWVudDgyODcyNzE0Nw==,2448579,2021-04-28T19:39:55Z,2021-04-28T19:39:55Z,MEMBER,"@fujiisoup added the vscode dark mode support, maybe he has ideas.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828259218,https://api.github.com/repos/pydata/xarray/issues/5201,828259218,MDEyOklzc3VlQ29tbWVudDgyODI1OTIxOA==,12912489,2021-04-28T08:27:14Z,2021-04-28T08:27:14Z,NONE,"Or not quite: The DOM seems to end at `editor-instance`, which is the whole Jupyter part of the Window. I cannot seem to access anything below that using the Developer Tools.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828236723,https://api.github.com/repos/pydata/xarray/issues/5201,828236723,MDEyOklzc3VlQ29tbWVudDgyODIzNjcyMw==,12912489,2021-04-28T07:55:23Z,2021-04-28T07:55:23Z,NONE,"Cheers, that was what I was looking for!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828230282,https://api.github.com/repos/pydata/xarray/issues/5201,828230282,MDEyOklzc3VlQ29tbWVudDgyODIzMDI4Mg==,5635139,2021-04-28T07:46:26Z,2021-04-28T07:46:26Z,MEMBER,I am out of comfort zone with CSS & JS — but does `Toggle Developer Tools` in VSCode give you access to the DOM?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828216637,https://api.github.com/repos/pydata/xarray/issues/5201,828216637,MDEyOklzc3VlQ29tbWVudDgyODIxNjYzNw==,12912489,2021-04-28T07:26:41Z,2021-04-28T07:28:06Z,NONE,"Ok, I tried, but got stuck: I can reproduce the issue in VScode. However, I cannot find a way to inspect the CSS in VScode's Jupyter console. The theme itself is a `json` and I cannot figure how this is translated into CSS.
We somehow need to detect the theme within `xr-wrap` and change colors accordingly. That would require checking if a parent/grandparent/... is something defined by VScode, or by checking if custom properties exist. Does someone know how to access the actual HTML/CSS in VScode? In a normal notebook I can use, e.g., the Firefox web-dev tools to do this directly in the browser, but I cannot find anything equivalent in VScode.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-828164312,https://api.github.com/repos/pydata/xarray/issues/5201,828164312,MDEyOklzc3VlQ29tbWVudDgyODE2NDMxMg==,5635139,2021-04-28T05:51:39Z,2021-04-28T05:51:39Z,MEMBER,"Thanks a lot @andersy005
That looks concerning enough we should fix before merging:
@SimonHeybrock how would you feel about giving the vscode-dark a swing too?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-827779385,https://api.github.com/repos/pydata/xarray/issues/5201,827779385,MDEyOklzc3VlQ29tbWVudDgyNzc3OTM4NQ==,13301940,2021-04-27T17:25:19Z,2021-04-27T17:25:19Z,MEMBER,"Here's the same notebook (using master branch)


","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-827771763,https://api.github.com/repos/pydata/xarray/issues/5201,827771763,MDEyOklzc3VlQ29tbWVudDgyNzc3MTc2Mw==,13301940,2021-04-27T17:13:22Z,2021-04-27T17:23:25Z,MEMBER,"Here are two screenshots for two themes (using this PR):
- [Night Owl](https://marketplace.visualstudio.com/items?itemName=sdras.night-owl)

- [GitHub Theme](https://marketplace.visualstudio.com/items?itemName=GitHub.github-vscode-theme)

","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-827745943,https://api.github.com/repos/pydata/xarray/issues/5201,827745943,MDEyOklzc3VlQ29tbWVudDgyNzc0NTk0Mw==,13301940,2021-04-27T16:32:57Z,2021-04-27T16:32:57Z,MEMBER,"> I don't have VS code so I can't try, but looking at the CSS I feel that this would actually break the colors there, since I moved the general settings from root into xr-wrap, below the level where the vscode-dark settings are defined. I don't know how to fix this though.
@SimonHeybrock, I am going to try this out in VS code and will report back how it goes. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-826492174,https://api.github.com/repos/pydata/xarray/issues/5201,826492174,MDEyOklzc3VlQ29tbWVudDgyNjQ5MjE3NA==,12912489,2021-04-26T04:29:00Z,2021-04-26T04:29:00Z,NONE,"I don't have VS code so I can't try, but looking at the CSS I feel that this would actually break the colors there, since I moved the general settings from `root` into `xr-wrap`, below the level where the `vscode-dark` settings are defined. I don't know how to fix this though.
So I would recommend *not* to merge this unless someone is able to try it out.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-826145021,https://api.github.com/repos/pydata/xarray/issues/5201,826145021,MDEyOklzc3VlQ29tbWVudDgyNjE0NTAyMQ==,5635139,2021-04-24T19:53:35Z,2021-04-24T19:53:35Z,MEMBER,@SimonHeybrock would you be able to see whether running this with `vscode-dark` is acceptable? We can merge with a `TODO` or issue assuming it doesn't make the issue worse in that environment.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-825695119,https://api.github.com/repos/pydata/xarray/issues/5201,825695119,MDEyOklzc3VlQ29tbWVudDgyNTY5NTExOQ==,2448579,2021-04-23T14:24:14Z,2021-04-23T14:24:14Z,MEMBER,"Thanks for the review @jsignell !
> I think the vscode-dark settings also may need to change,
Can someone try out this PR in VS Code please?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-824848681,https://api.github.com/repos/pydata/xarray/issues/5201,824848681,MDEyOklzc3VlQ29tbWVudDgyNDg0ODY4MQ==,4806877,2021-04-22T13:37:08Z,2021-04-22T13:37:08Z,CONTRIBUTOR,"I didn't manage to reproduce the lag, but this change seems totally reasonable to me!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023
https://github.com/pydata/xarray/pull/5201#issuecomment-823845269,https://api.github.com/repos/pydata/xarray/issues/5201,823845269,MDEyOklzc3VlQ29tbWVudDgyMzg0NTI2OQ==,5635139,2021-04-21T07:32:24Z,2021-04-21T07:32:24Z,MEMBER,Thanks @SimonHeybrock ! Tagging @jsignell & @benbovy as the experts!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,863506023