Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Poor performance in largish files

未关闭
#676 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
emacs-lisp
领域
performance

调研方向

首先,在一个包含 2000+ 行的 PHP 文件中重现延迟,并对报告中所示的编辑路径进行性能分析。阅读 php-syntax-propertize-function 和 c-after-change 链,尤其是 c-multiline-string-check-final-quote 和 syntax-ppss。完成的标准是找出并解决报告中所述的每次击键都会变慢的问题,同时不破坏 PHP 语法处理。

由索引模型根据 Issue 内容生成。

描述

Every keystroke results in a delay of a few seconds in large files (2000+ lines) making the plugin unusable.

Here's a profile trace:

- command-execute                                                1018  97%
 - call-interactively                                            1018  97%
  - funcall-interactively                                        1018  97%
   - eval-last-sexp                                              1018  97%
    - elisp--eval-last-sexp                                      1018  97%
     - elisp--preceding-sexp                                     1018  97%
      - read                                                     1018  97%
       - debug                                                   1018  97%
        - recursive-edit                                         1012  97%
         - command-execute                                       1000  96%
          - call-interactively                                   1000  96%
           - funcall-interactively                                971  93%
            - newline                                             971  93%
             - self-insert-command                                971  93%
              - electric-indent-post-self-insert-function                949  91%
               - indent-according-to-mode                         949  91%
                - php-cautious-indent-line                        949  91%
                 - if                                             949  91%
                  - let                                           949  91%
                   - if                                           949  91%
                    - progn                                       949  91%
                     - funcall                                    949  91%
                      - c-indent-line                             949  91%
                       - c-shift-line-indentation                 949  91%
                        - c-after-change                          943  90%
                         - mapc                                   939  90%
                          - #<compiled 0x157143360ec5>                939  90%
                           - c-after-change-mark-abnormal-strings                939  90%
                            - c-multiline-string-check-final-quote                935  89%
                             - c-literal-limits                   935  89%
                              - c-full-pp-to-literal                935  89%
                               - c-parse-ps-state-below                935  89%
                                - parse-partial-sexp                934  89%
                                 - internal--syntax-propertize                934  89%
                                  - syntax-propertize                934  89%
                                   - php-syntax-propertize-function                915  87%
                                    - while                       914  87%
                                     - if                         913  87%
                                      - php-in-comment-p                913  87%
                                       - nth                      912  87%
                                          syntax-ppss                911  87%
                                    + funcall                       1   0%
                                   + php-syntax-propertize-extend-region                 19   1%
                            + c-literal-limits                      4   0%
                         + c-trim-found-types                       3   0%
                         + c-invalidate-sws-region-after                  1   0%
                        + back-to-indentation                       4   0%
                        + c-before-change                           2   0%
              + c-after-change                                     17   1%
              + #<compiled 0x157143af232d>                          4   0%
              + c-before-change                                     1   0%
           + byte-code                                             29   2%
         + redisplay_internal (C function)                          5   0%
         + timer-event-handler                                      1   0%
+ ...                                                              22   2%

Let me know how I can debug more!

主要语言
Emacs Lisp
星标
606
派生
117
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

emacs-php/php-mode 的其他 Issue

查看 emacs-php/php-mode 的全部 Issue

相似的 Issue

更多 Performance Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。