Skip to content

Poor performance in largish files #676

@eoghanmurray

Description

@eoghanmurray

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions