bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31138: Native json slower than json.el


From: yyoncho
Subject: bug#31138: Native json slower than json.el
Date: Sun, 24 Mar 2019 22:57:58 +0200

Hi Eli,

From what I can see the Qbuffer_list_update_hook is called.

- command-execute                                                 865  92%
 - call-interactively                                             865  92%
  - funcall-interactively                                         865  92%
   - eval-defun                                                   865  92%
    - apply                                                       865  92%
     - edebug-eval-defun                                          865  92%
      - eval                                                      865  92%
       - progn                                                    865  92%
        - message                                                 865  92%
         - benchmark-run                                          865  92%
          - let                                                   865  92%
           - list                                                 865  92%
            - benchmark-elapse                                    865  92%
             - let                                                865  92%
              - ignore                                            865  92%
               - json-parse-string                                596  63%
                - run-hooks                                       303  32%
                 - doom-modeline-update-persp-name                116  12%
                  - get-current-persp                             110  11%
                     get-frame-persp                               96  10%
                   + window-persp-set-p                             4   0%
                     #<compiled 0x1594da86eb25>                     1   0%
                 + doom-modeline-set-selected-window                  7   0%
                - #<compiled 0x1594da2b4a39>                      268  28%
                 + spacemacs/useful-buffer-p                      245  26%
                 + #<lambda 0x85a9e12ee490302>                     17   1%
                + replace-buffer-in-windows                        21   2%
+ ...                                                              74   7%

I want to share some observations:

1. The hooks are not called initially, I am not sure what triggers them. This makes the json parsing extremely slow(100 times)
2. Even without the hooks, the JSON parsing is slower than the emacs -q native parsing when I am running my setup. This will require additional investigation. 

Thanks,
Ivan

On Sun, Mar 24, 2019 at 8:28 PM Eli Zaretskii <eliz@gnu.org> wrote:
> From: yyoncho <yyoncho@gmail.com>
> Date: Sun, 24 Mar 2019 20:24:35 +0200
> Cc: Sébastien Chapuis <sebastien@chapu.is>,
>       31138@debbugs.gnu.org
>
> Before starting to test the patch I saw that Fget_buffer_create is running Qbuffer_list_update_hook - do we
> need to do a similar thing for it too?

Maybe, but let's first see if the patch as I sent is already producing
some positive effect, shall we?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]