* [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend
@ 2021-10-28 11:28 Christopher M. Miles
2021-10-28 11:42 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: Christopher M. Miles @ 2021-10-28 11:28 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1.1: Type: text/plain, Size: 5407 bytes --]
Here is the profiler report:
CPU:
#+begin_example
4003 66% - command-execute
4003 66% - call-interactively
3913 65% - funcall-interactively
3320 55% - kill-buffer
3318 55% - org-persist-write-all-buffer
3318 55% - org-persist-write-all
3318 55% - if
3318 55% - let
3318 55% - while
3318 55% - let
3318 55% - if
3318 55% - progn
3318 55% - org-persist-write
3318 55% - if
3318 55% - save-current-buffer
3318 55% - let
3097 51% - let
3097 51% - if
3097 51% - if
3095 51% - progn
3095 51% - let
1799 29% - unwind-protect
1799 29% - prog1
1798 29% - save-current-buffer
114 1% - write-region
114 1% - select-safe-coding-system
98 1% - find-auto-coding
94 1% auto-coding-alist-lookup
4 0% sgml-html-meta-auto-coding-function
15 0% + find-coding-systems-region
1290 21% - let
1290 21% - unwind-protect
1290 21% - prog1
1289 21% - save-current-buffer
182 3% - write-region
182 3% - select-safe-coding-system
155 2% - find-auto-coding
154 2% auto-coding-alist-lookup
1 0% sgml-html-meta-auto-coding-function
26 0% + find-coding-systems-region
6 0% if
220 3% + org-persist--get-index
2 0% + valign--maybe-clean-advice
592 9% + counsel-M-x
1 0% + previous-line
90 1% + ivy-completing-read
978 16% - youtube-dl--filter
978 16% - youtube-dl--redisplay
585 9% - youtube-dl--list-buffer
585 9% - youtube-dl-list-mode
332 5% - hl-line-mode
332 5% - add-hook
332 5% + sort
165 2% + special-mode
88 1% + run-mode-hooks
393 6% + youtube-dl-list-redisplay
954 15% + ...
40 0% + timer-event-handler
9 0% + redisplay_internal (C function)
9 0% + global-font-lock-mode-check-buffers
5 0% + global-dash-fontify-mode-check-buffers
3 0% + global-prettify-symbols-mode-check-buffers
3 0% + yas-global-mode-check-buffers
3 0% + global-atomic-chrome-edit-mode-check-buffers
2 0% + global-edit-server-edit-mode-check-buffers
2 0% + global-flycheck-mode-check-buffers
2 0% + global-company-mode-check-buffers
1 0% + org-pretty-tags-global-mode-check-buffers
1 0% + magit-auto-revert-mode-check-buffers
1 0% + emojify-update-visible-emojis-background-after-command
1 0% + global-ligature-mode-check-buffers
1 0% + global-emojify-mode-check-buffers
1 0% + global-anzu-mode-check-buffers
1 0% + mode-local-post-major-mode-change
#+end_example
Memory report:
#+begin_example
5,860,697,032 99% - ...
5,860,697,032 99% - org-persist-write-all
5,860,697,032 99% - if
5,860,697,032 99% - let
5,860,697,032 99% - while
5,860,697,032 99% - let
5,860,697,032 99% - if
5,860,697,032 99% - progn
5,860,697,032 99% - org-persist-write
5,860,697,032 99% - if
5,860,697,032 99% - save-current-buffer
5,860,697,032 99% - let
5,671,666,312 96% - let
5,671,666,312 96% - if
5,671,666,312 96% - if
5,671,666,312 96% - progn
5,671,666,312 96% - let
4,109,383,193 70% - unwind-protect
4,109,383,193 70% - prog1
4,109,383,193 70% - save-current-buffer
4,825,178 0% - write-region
4,792,442 0% + select-safe-coding-system
32,736 0% + make-lock-file-name
39,558 0% + prin1
1,562,123,885 26% + let
32,736 0% + if
28,290 0% generate-new-buffer
189,030,720 3% - org-persist--get-index
189,030,720 3% - let*
189,030,720 3% + let
5,807,484 0% + command-execute
1,312,080 0% + redisplay_internal (C function)
89,824 0% + youtube-dl--filter
2,198 0% + timer-event-handler
42 0% + #<compiled -0x2222a52d2f12599>
#+end_example
[-- Attachment #1.2: Type: text/html, Size: 6382 bytes --]
[-- Attachment #2: Type: text/plain, Size: 282 bytes --]
<#secure method=pgpmime mode=sign>
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend
2021-10-28 11:28 [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend Christopher M. Miles
@ 2021-10-28 11:42 ` Ihor Radchenko
2021-10-28 13:58 ` Christopher M. Miles
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2021-10-28 11:42 UTC (permalink / raw)
To: numbchild; +Cc: Org Mode
"Christopher M. Miles" <numbchild@gmail.com> writes:
> Here is the profiler report:
>
> CPU:
>
> #+begin_example
> 4003 66% - command-execute
> 4003 66% - call-interactively
> 3913 65% - funcall-interactively
> 3320 55% - kill-buffer
> 3318 55% - org-persist-write-all-buffer
> 3318 55% - org-persist-write-all
Sorry for this. Should be already fixed by 5abd149cf. Are you on latest
main?
Best,
Ihor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend
2021-10-28 11:42 ` Ihor Radchenko
@ 2021-10-28 13:58 ` Christopher M. Miles
2021-10-28 14:40 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: Christopher M. Miles @ 2021-10-28 13:58 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode
[-- Attachment #1.1: Type: text/plain, Size: 4466 bytes --]
Ihor Radchenko <yantar92@gmail.com> writes:
> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> Here is the profiler report:
>>
>> CPU:
>>
>> #+begin_example
>> 4003 66% - command-execute
>> 4003 66% - call-interactively
>> 3913 65% - funcall-interactively
>> 3320 55% - kill-buffer
>> 3318 55% - org-persist-write-all-buffer
>> 3318 55% - org-persist-write-all
>
> Sorry for this. Should be already fixed by 5abd149cf. Are you on latest
> main?
>
> Best,
> Ihor
Thanks for quick patch, I'm on the latest main. and I pulled your patch. Now it's not infinite
looping, but still takes about 3.5 seconds. So I take another profiler profiling again.
CPU
#+begin_example
4824 88% - command-execute
4824 88% - call-interactively
4797 87% - funcall-interactively
4313 78% - kill-buffer
4310 78% - org-persist-write-all-buffer
4310 78% - org-persist-write-all
4310 78% - if
4310 78% - let
4310 78% - while
4310 78% - let
4310 78% - if
4310 78% - progn
4310 78% - org-persist-write
4310 78% - if
4310 78% - save-current-buffer
4310 78% - let
3903 71% - let
3903 71% - if
3903 71% - if
3858 70% - progn
3858 70% - let
3380 61% - unwind-protect
3380 61% - prog1
3380 61% - save-current-buffer
103 1% + write-region
390 7% + let
88 1% if
405 7% + org-persist--get-index
2 0% + setq
1 0% + auto-revert-notify-rm-watch
1 0% + valign--maybe-clean-advice
1 0% + recentf-track-closed-file
484 8% + counsel-M-x
27 0% + ivy-completing-read
642 11% - ...
642 11% Automatic GC
1 0% + global-font-lock-mode-check-buffers
1 0% + redisplay_internal (C function)
#+end_example
Memory:
#+begin_example
4,155,608,836 99% - command-execute
4,155,608,836 99% - call-interactively
4,155,381,887 99% - funcall-interactively
4,151,008,326 99% - kill-buffer
4,151,002,497 99% - org-persist-write-all-buffer
4,151,002,497 99% - org-persist-write-all
4,151,002,497 99% - if
4,151,002,497 99% - let
4,151,002,497 99% - while
4,151,002,497 99% - let
4,151,002,497 99% - if
4,150,994,313 99% - progn
4,150,994,313 99% - org-persist-write
4,150,994,313 99% - if
4,150,994,313 99% - save-current-buffer
4,150,994,313 99% - let
4,140,546,179 99% - let
4,140,546,179 99% - if
4,140,546,179 99% - if
4,140,540,035 99% - progn
4,140,540,035 99% - let
3,879,416,903 93% - unwind-protect
3,879,416,903 93% - prog1
3,879,416,903 93% - save-current-buffer
20,391,917 0% - write-region
20,165,663 0% + select-safe-coding-system
226,254 0% + make-lock-file-name
256,994 0% + prin1
260,984,307 6% + let
122,760 0% + if
16,065 0% generate-new-buffer
7,942,223 0% + org-persist--get-index
2,505,911 0% + setq
8,184 0% + or
3,072 0% + tramp-flush-file-function
1,120 0% + preview-kill-buffer-cleanup
1,024 0% + save-place-to-alist
613 0% + replace-buffer-in-windows
4,373,561 0% + counsel-M-x
226,949 0% + ivy-completing-read
65,528 0% + ...
20,692 0% + redisplay_internal (C function)
#+end_example
[-- Attachment #1.2: Type: text/html, Size: 5690 bytes --]
[-- Attachment #2: Type: text/plain, Size: 282 bytes --]
<#secure method=pgpmime mode=sign>
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend
2021-10-28 13:58 ` Christopher M. Miles
@ 2021-10-28 14:40 ` Ihor Radchenko
2021-10-28 15:57 ` [SOLVED] " Christopher M. Miles
0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2021-10-28 14:40 UTC (permalink / raw)
To: Christopher M. Miles; +Cc: Org Mode
"Christopher M. Miles" <numbchild@gmail.com> writes:
> Thanks for quick patch, I'm on the latest main. and I pulled your patch. Now it's not infinite
> looping, but still takes about 3.5 seconds. So I take another profiler profiling again.
Fixed (hopefully) on main via 1b2d06880. Please, restart emacs after
loading the latest Org (or call M-: (org-persist-gc) before testing.
A bug introduced in 5ca866d08 caused cache index corruption.
org-persist-gc should fix the corrupted index.
Best,
Ihor
^ permalink raw reply [flat|nested] 5+ messages in thread
* [SOLVED] Re: [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend
2021-10-28 14:40 ` Ihor Radchenko
@ 2021-10-28 15:57 ` Christopher M. Miles
0 siblings, 0 replies; 5+ messages in thread
From: Christopher M. Miles @ 2021-10-28 15:57 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Org Mode
[-- Attachment #1.1: Type: text/plain, Size: 642 bytes --]
Ihor Radchenko <yantar92@gmail.com> writes:
> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> Thanks for quick patch, I'm on the latest main. and I pulled your patch. Now it's not infinite
>> looping, but still takes about 3.5 seconds. So I take another profiler profiling again.
>
> Fixed (hopefully) on main via 1b2d06880. Please, restart emacs after
> loading the latest Org (or call M-: (org-persist-gc) before testing.
>
> A bug introduced in 5ca866d08 caused cache index corruption.
> org-persist-gc should fix the corrupted index.
>
> Best,
> Ihor
With the second latest patch, the problem solved. Thanks Thanks a lot.!
[-- Attachment #1.2: Type: text/html, Size: 1034 bytes --]
[-- Attachment #2: Type: text/plain, Size: 282 bytes --]
<#secure method=pgpmime mode=sign>
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-28 16:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28 11:28 [BUG] kill-buffer invoked org-persistent-write-all-buffer caused Emacs long suspend Christopher M. Miles
2021-10-28 11:42 ` Ihor Radchenko
2021-10-28 13:58 ` Christopher M. Miles
2021-10-28 14:40 ` Ihor Radchenko
2021-10-28 15:57 ` [SOLVED] " Christopher M. Miles
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).