[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How should this profiler report interpreted?
From: |
Stefan Monnier |
Subject: |
Re: How should this profiler report interpreted? |
Date: |
Fri, 26 Mar 2021 14:38:51 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> ...
> (while (looking-at "INSERT INTO `test2`.+,\\([0-9]+\\));")
> (let ((item (match-string 1))
> (line (buffer-substring (line-beginning-position)
> (line-end-position))))
> (message item)
> (save-excursion
> (re-search-backward (concat "INSERT INTO `test1`.+"
> "VALUES
> ([^,]+,'[^']*','[^']*','[^']*','[^']*',[^,]+,[^,]+,"
> item
> ","))
> (end-of-line)
> (insert "\n" line))
> (delete-region (line-beginning-position) (1+ (line-end-position)))
> )))
If that's indeed the code in which all the time is spent, then the
profile is very misleading (IOW bogus) because the time won't be spent
in `save-excursion` but in `re-search-backward`.
If you can reproduce this bogus profile, please `M-x report-emacs-bug`
(ideally with a corresponding sample file on which to run the code).
Stefan
- How should this profiler report interpreted?, scame, 2021/03/26
- Re: How should this profiler report interpreted?, scame, 2021/03/26
- Re: How should this profiler report interpreted?, Emanuel Berg, 2021/03/26
- Re: How should this profiler report interpreted?,
Stefan Monnier <=
- Re: How should this profiler report interpreted?, Emanuel Berg, 2021/03/26
- Re: How should this profiler report interpreted?, Stefan Monnier, 2021/03/26
- Re: How should this profiler report interpreted?, Emanuel Berg, 2021/03/26
- Re: How should this profiler report interpreted?, Emanuel Berg, 2021/03/27
- Re: How should this profiler report interpreted?, Emanuel Berg, 2021/03/27
Re: How should this profiler report interpreted?, scame, 2021/03/26
Re: How should this profiler report interpreted?, scame, 2021/03/26