jupyterlab/jupyterlab

Switching to markdown preview is slow; the scroll position gets lost

Open

#13,678 建立於 2022年12月29日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (13,454 star) (2,937 fork)batch import
bughelp wantedpkg:markdownviewertag:Performance

描述

Description

Switching tabs to markdown viewer is slow. It takes ~11 partially presented frames and renderMarkdown gets called twice.

Reproduce

  1. Open JupyterLab README.md with right click: "Open With" → "Markdown Preview"
  2. Open a new launcher
  3. Switch back and forth
  4. See that the markdown tab contents flickers

Screenshot from 2022-12-29 13-51-24

Screenshot from 2022-12-29 13-56-06

For scroll position not being preserved see:

scroll-position-md

Expected behavior

  • We should not need to invalidate the rendered markdown when switching back and forth and definitely we should not call renderMarkdown twice.
  • The scroll position should be preserved.

Context

  • JupyterLab version: 4.0.0a31 and 3.x

貢獻者指南