Ihor Radchenko <yanta...@gmail.com> writes: Thank you for helping me out.
Context: With all this talk about Emacs 29 around the corner, I became scared that the upcoming Org will render my Org notes unusable. Hence, I decided to ask now, before it happens. > Can you > 1. M-x debug-on-entry <RET> org-export--generate-copy-script <RET> > 2. Start export > 3. Step into the function (use "d", not "c" binding) > 4. Try to identify which part (if any) is being slow FYI: I had to do "(require 'ox)" before this worked. I spent about 30 minutes pressing "d". I saw Org sorting some character encodings in a large number of steps, and then it started doing a large number of various tasks, spending time in the AVL tree, etc. I have no idea what else to do. I could not figure out how to step through N times at once for N > 1. I tried 'C-9 C-9 d' to step through 99 times, but that did not work. The documentation for 'debugger-step-through' contains just two sentences, and I do not even understand the second one: "Proceed, stepping through subexpressions of this expression. Enter another debugger on next entry to eval, apply or funcall." > If the above does not work, you can also try > 1. M-x trace-function <RET> org-export--generate-copy-script <RET> > 2. M-x elp-instrument-function <RET> org-export--generate-copy-script > <RET> > 2. Run export, possibly terminating it with C-g in the process > 3. M-x elp-results <RET> > 4. Share the contents of the trace buffer and the contents of the > elp-results buffer. So, I ran the export for 17 minutes and then terminated with 'C-g'. The trace buffer included a very long line, which made Emacs froze, and I had to kill it, after waiting for 5 minutes, losing all data in the process. I then tried to run the export for 3 minutes, and I managed to copy the trace buffer, but upon pasting it into another buffer, Emacs froze again, and I had to kill it again, losing data once again. I then ran the export for 3 minutes once again, this time enabling just the 'elp-instrument-function' to avoid freezing. The 'elp-results' output: > org-export--generate-copy-script 1221 2.8268540000 0.0023151957 (The buffer also contains a header line, with e.g. "Function Name", but Emacs did not allow me to select and copy it for you.) Rudy -- "Mathematics takes us still further from what is human into the region of absolute necessity, to which not only the actual world, but every possible world, must conform." -- Bertrand Russell, 1902 Rudolf Adamkovič <salu...@me.com> [he/him] Studenohorská 25 84103 Bratislava Slovakia