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

正则表达式性能低下 #201

Closed
singularity-s0 opened this issue Feb 3, 2023 · 5 comments
Closed

正则表达式性能低下 #201

singularity-s0 opened this issue Feb 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@singularity-s0
Copy link
Collaborator

目前,由于dart正则表达式解析性能较低,树洞页面渲染每张卡片需要5-6ms,严重影响UI流畅度。

目前对正则表达式依赖较大的部分包括:

  • Markdown语法解析
  • 日期解析

若移除上述两处解析,则渲染时间可以降低到1ms。

潜在的解决方案包括:

  1. 不管
  2. 采用 Isolate 在额外进程中完成解析
  3. 传到 Native 完成解析
  4. 由后端发送不需要解析的数据

但显然都不是很理想。需要其他办法解决此问题。

@singularity-s0 singularity-s0 added bug Something isn't working enhancement New feature or request question Further information is requested labels Feb 3, 2023
@singularity-s0 singularity-s0 added this to the 1.3.12 milestone Feb 3, 2023
@w568w w568w added help wanted Extra attention is needed and removed question Further information is requested labels Feb 4, 2023
@w568w
Copy link
Member

w568w commented Feb 4, 2023

question tag is for issues that is too brief to get any useful information. Use help wanted to declare that you believe it cannot be coped with by yourself.

@singularity-s0 singularity-s0 modified the milestones: 1.3.12, 1.4.0 Mar 14, 2023
@Boreas618
Copy link
Collaborator

Why is the third approach not ideal?

@w568w
Copy link
Member

w568w commented Aug 15, 2023

这个问题有任何在 1.4.0 中必须解决的必要吗?如果没有,我建议从 Milestone 中移除。

@Boreas618
Copy link
Collaborator

没有

@w568w w568w removed this from the 1.4.0 milestone Aug 15, 2023
@w568w
Copy link
Member

w568w commented Mar 27, 2024

随着 #334 合并,我认为没有必要继续纠结该问题,直到出现新的性能问题或者 #334 的解决方案出现严重问题。

@w568w w568w closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants