Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用了VditorPreview 进行渲染,渲染时间太长 #1684

Open
liukkm opened this issue Sep 28, 2024 · 1 comment
Open

使用了VditorPreview 进行渲染,渲染时间太长 #1684

liukkm opened this issue Sep 28, 2024 · 1 comment

Comments

@liukkm
Copy link

liukkm commented Sep 28, 2024

image
如图所示 我只使用了 VditorPreview, 但是渲染页面(在没有图表的情况下)的时候 一个预览器就渲染了 8000多ms,
image

mounted() {
    this.$nextTick(async () => {
      this.$nextTick(async () => {
        const el = document.getElementById('markdown-' + this.id)
        
        console.time()
        let html = await VditorPreview.md2html(this.content, {
            cdn: 'https://unpkg.com/[email protected]'
          })
        if (el) {
          el.innerHTML = html
          VditorPreview.chartRender(el)
          this.isShow  =true
          console.timeEnd()
        }
      })
    })
  },

期待的结果

可以快速进行渲染

版本信息

  • 版本:3.10.6
  • 操作系统:macos
  • 浏览器:Google

其他信息

@liukkm
Copy link
Author

liukkm commented Sep 28, 2024

可以判定的是: md2html 耗时过长

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant