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

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

Re: profiler-report seems to be missing data?


From: Eli Zaretskii
Subject: Re: profiler-report seems to be missing data?
Date: Wed, 15 Aug 2018 21:46:59 +0300

> From: Charlie Andrews <andrews.charlie@gmail.com>
> Date: Wed, 15 Aug 2018 11:00:50 -0400
> 
> The profiler report seems to blame the `let*` function within
> `ftf-project-files-hash`.
> 
> However, looking at that function:
> 
>     (defun ftf-project-files-hash ()
>       "Returns a hashtable filled with file names as the key and "
>       (let ((default-directory (ftf-project-directory))
>             (table (make-hash-table :test 'equal)))
>         (mapcar (lambda (file)
>                   (let* ((file-name (file-name-nondirectory file))
>                          (full-path (expand-file-name file))
>                          (pathlist (cons full-path (gethash file-name table
> nil))))
>                     (puthash file-name pathlist table)))
>                 (split-string (ftf-project-files-string)))
>         table))
> 
> It seems incredibly unlikely that `let*` is the slow part, but rather one
> of the functions called within that `let*`.
> 
> Why is `profiler-report` stopping at `let*` rather than telling me which
> component of that `let*` is slow? How can I dig deeper to find which
> exactly function is slow?

Was the code you profiled byte-compiled?  If so, load the relevant .el
file, and then re-run the profiling session.  You might obtain a much
more detailed and accurate profile.



reply via email to

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